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;
}