Mono Class Library: System.Guid Overview | Members

System.Guid.ToString Method

Returns the Guid as a string, formatted according to a format string.

public string ToString (string format)

Parameters

format
A format string. Valid values are listed in the remarks section.

Returns

The Guid as a string.

Remarks

The following string values for format are allowed:

FormatDescription
d, DThe Guid is returned as a set of hexidecimal numbers separated by dashes. This is the default representation.
b, BThe Guid is returned enclosed in braces.
p, PThe Guid is returned enclosed in parenthesis.
n, NThe Guid is returned without dashes or braces/parenthesis.

Requirements

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