System.Xml.XmlConvert.TryToInt32 C# (CSharp) Method

TryToInt32() static private method

static private TryToInt32 ( string s, Int32 &result ) : Exception
s string
result System.Int32
return System.Exception
        internal static Exception TryToInt32(string s, out Int32 result)
        {
            if (!Int32.TryParse(s, NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
            {
                return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int32"));
            }
            return null;
        }