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