Mono Class Library: System.Xml.XmlConvert Overview | Members

System.Xml.XmlConvert.ToSByte Method

Converts a string to a sbyte equivalent. [Edit]

[System.CLSCompliant(false)]
public static sbyte ToSByte (string s)

Parameters

s
The string to convert. [Edit]

Returns

The sbyte equivalent of s. [Edit]

Exceptions

TypeReason
ArgumentNullExceptions is a null reference. [Edit]
FormatExceptions is not in the correct format. [Edit]
OverflowExceptions represents a number less than sbyte.MinValue or greater than sbyte.MaxValue. [Edit]

Remarks

This member is not CLS-compliant. For a CLS-compliant alternative, use XmlConvert.ToInt16(string)(string).

This method calls sbyte.Parse(string)(s, System.Globalization.NumberStyles.AllowLeadingSign|System.Globalization.NumberStyles.AllowLeadingWhite|System.Globalization.NumberStyles.AllowTrailingWhite, System.Globalization.NumberFormatInfo.InvariantInfo).

[Edit]

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0