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

TryToUInt16() static private méthode

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