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

TryToByte() static private méthode

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