CSharp examples for System.Xml:XML Attribute
Get U Long Attr
using System.Xml.Linq; using System;/*www . j a v a2s .c om*/ public class Main{ public static ulong GetULongAttr(this XElement elem, string name) { ulong.TryParse(elem.GetAttrValue(name), out var v); return v; } public static string GetAttrValue(this XElement elem, string attrName) { return elem.Attribute(attrName)?.Value; } }