[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Converts the string representation of a number to its Byte equivalent.
This API is not CLS-compliant. Namespace: System
Assembly: mscorlib (in mscorlib.dll)
- Type: System..::..String
A string that contains a number to convert. The string is interpreted using the style.
Return ValueType: System..::..Byte
A byte value that is equivalent to the number contained in s.
The s parameter contains a number of the form:
Elements in square brackets ([ and ]) are optional. The following table describes each element.
Optional white space.
An optional positive or negative sign.
A sequence of digits ranging from 0 to 9.
The s parameter is interpreted using the style. In addition to the byte value's decimal digits, only leading and trailing spaces together with a leading sign are allowed. (If the sign is present, it must be a positive sign or the method throws an .) To explicitly define the style elements that can be present in s, use either the or the method.
The s parameter is parsed using the formatting information in a NumberFormatInfo object that is initialized for the current system culture. For more information, see CurrentInfo. To parse a string using the formatting information of some other culture, use the method.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.