erminas.SmartAPI.Utils.XmlUtil.GetIntAttributeValue C# (CSharp) Method

GetIntAttributeValue() public static method

public static GetIntAttributeValue ( this xmlElement, string attributeName ) : int?
xmlElement this
attributeName string
return int?
        public static int? GetIntAttributeValue(this XmlElement xmlElement, string attributeName)
        {
            XmlAttribute attr = xmlElement.Attributes[attributeName];
            return attr == null ? (int?) null : int.Parse(attr.Value);
        }