Mono Class Library: System.Enum Overview | Members

System.Enum.ToString Method

Converts the value of the current instance to its equivalent string representation using the specified format. [Edit]

public string ToString (string format)

Parameters

format
A string that specifies the format to use when converting the current instance to a string. Specify one of the following values in upper or lowercase: "G", "D", "X", or "F" . [Edit]

Returns

The string representation of the value of the current instance as specified by format. [Edit]

Exceptions

TypeReason
FormatExceptionformat contains an invalid value. [Edit]

Remarks

If format is a null reference or an empty string, the return value is formatted using the general format specifier ("G").

Note: For details on the format specifiers used with an enumeration object, see Enum.Format(Type, object, string) .

[Edit]

Requirements

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