Encog.Util.XMLUtil.FindElementAsInt C# (CSharp) Method

FindElementAsInt() public static method

Find an element, return as an int.
public static FindElementAsInt ( XmlElement e, String find, int def ) : int
e System.Xml.XmlElement The element that searches.
find String What we are searching for.
def int The default value, if we fail to find it.
return int
        public static int FindElementAsInt(XmlElement e, String find,
                 int def)
        {
            String str = FindElementAsString(e, find);
            if (str == null)
            {
                return def;
            }

            return int.Parse(str);

        }