Creates a unique, random ID suitable for use in an xml:id field. The value is hard to guess and unique.
Namespace: Microsoft.IdentityModel
Assembly: Microsoft.IdentityModel (in microsoft.identitymodel.dll)

Usage

Visual Basic
Dim returnValue As String

returnValue = UniqueId.CreateRandomId

Syntax

Visual Basic
Public Shared Function CreateRandomId As String
C#
public static string CreateRandomId ()
C++
public:
static String^ CreateRandomId ()
J#
public static String CreateRandomId ()
JScript
public static function CreateRandomId () : String

Return Value

The random ID.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

See Also