Share via


UniqueId.CreateRandomId Method

Definition

Overloads

CreateRandomId()

Creates a unique, random ID suitable for use in an xml:id field. The value is hard to guess and unique.

CreateRandomId(String)

Creates a unique, random ID similar to that created by CreateRandomId, but instead of an underscore, the supplied prefix is used.

CreateRandomId()

Creates a unique, random ID suitable for use in an xml:id field. The value is hard to guess and unique.

public static string CreateRandomId ();
static member CreateRandomId : unit -> string
Public Shared Function CreateRandomId () As String

Returns

The unique ID.

Applies to

CreateRandomId(String)

Creates a unique, random ID similar to that created by CreateRandomId, but instead of an underscore, the supplied prefix is used.

public static string CreateRandomId (string prefix);
static member CreateRandomId : string -> string
Public Shared Function CreateRandomId (prefix As String) As String

Parameters

prefix
String

The prefix to use.

Returns

The random URI.

Applies to