System.Xml.XmlConvert.TryToInt16 C# (CSharp) Méthode

TryToInt16() static private méthode

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