UniqueId.CreateUniqueId Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateUniqueId() |
Creates a unique ID suitable for use in an xml:id field. The value is not hard to guess but is unique. |
CreateUniqueId(String) |
Creates a unique ID similar to that created by CreateNonRandomId, but instead of an underscore, the supplied prefix is used. |
CreateUniqueId()
Creates a unique ID suitable for use in an xml:id field. The value is not hard to guess but is unique.
public static string CreateUniqueId ();
static member CreateUniqueId : unit -> string
Public Shared Function CreateUniqueId () As String
Returns
The unique ID.
Applies to
CreateUniqueId(String)
Creates a unique ID similar to that created by CreateNonRandomId, but instead of an underscore, the supplied prefix is used.
public static string CreateUniqueId (string prefix);
static member CreateUniqueId : string -> string
Public Shared Function CreateUniqueId (prefix As String) As String
Parameters
- prefix
- String
The prefix to use.
Returns
The unique ID, with the given prefix.