Mono Class Library: System.Byte Overview | Members

System.Byte.ToString Method

Returns a string representation of the value of the current instance. [Edit]

public string ToString (string format, IFormatProvider provider)

Parameters

format
A string containing a character that specifies the format of the returned string. [Edit]
provider
A IFormatProvider that supplies a System.Globalization.NumberFormatInfo instance containing culture-specific formatting information. [Edit]
format
Documentation for this section has not yet been entered. [Edit]
provider
Documentation for this section has not yet been entered. [Edit]

Returns

A string representation of the current instance formatted as specified by format. The string takes into account the information in the System.Globalization.NumberFormatInfo instance supplied by provider. [Edit]

Exceptions

TypeReason
FormatExceptionformat is invalid. [Edit]

Remarks

If provider is null or a System.Globalization.NumberFormatInfo cannot be obtained from provider , the formatting information for the current system culture is used.

If format is a null reference, the general format specifier "G" is used.

The following table lists the characters that are valid for the byte type:

Format CharactersDescription
"C", "c"Currency format.
"D", "d"Decimal format.
"E", "e"Exponential notation format.
"F", "f"Fixed-point format.
"G", "g"General format.
"N", "n"Number format.
"P", "p"Percent format.
"X", "x"Hexadecimal format.
Note:

For a detailed description of formatting, see the IFormattable interface.

This method is implemented to support the IFormattable interface.

[Edit]

Requirements

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