GuidToString Method (String, IFormatProvider) |
Returns a string representation of the value of this instance of the
Guid structure, according to the provided format specifier and culture-specific format information.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string ToString(
string format,
IFormatProvider provider
)
Parameters
- format
- Type: SystemString
A single format specifier that indicates how to format the value of this Guid. The format parameter can be "N", "D", "B", "P", or "X". If format is null or an empty string (""), "D" is used. - provider
- Type: SystemIFormatProvider
(Reserved) An object that supplies culture-specific formatting services.
Return Value
Type:
StringThe value of this
Guid, represented as a series of lowercase hexadecimal digits in the specified format.
Exceptions Exception | Condition |
---|
FormatException | The value of format is not null, an empty string (""), "N", "D", "B", "P", or "X". |
See Also