Click or drag to resize
GuidToString Method (String)
Returns a string representation of the value of this Guid instance, according to the provided format specifier.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public string ToString(
	string format
)

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.

Return Value

Type: String
The value of this Guid, represented as a series of lowercase hexadecimal digits in the specified format.
Exceptions
ExceptionCondition
FormatExceptionThe value of format is not null, an empty string (""), "N", "D", "B", "P", or "X".
See Also