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

TryToByte() static private method

static private TryToByte ( string s, Byte &result ) : Exception
s string
result Byte
return 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;
        }