CodeIdentifiers.MakeUnique(String) Method

Definition

Determines whether the input name conflicts with another name within the CodeIdentifiers instance's scope and, if it does, generates a modified string.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 System::String ^ MakeUnique(System::String ^ identifier);
public string MakeUnique (string identifier);
member this.MakeUnique : string -> string
Public Function MakeUnique (identifier As String) As String

Parameters

identifier
String

The name to modify if it is not already unique.

Returns

The identifier parameter value or a modified string if there is a name collision.

Remarks

The input name is not unique if it was passed previously to the Add, AddUnique, or AddReserved method, or if it was generated by the AddUnique method. If the name is not unique, a new string is generated by appending to the original string.

If you want to control the names of code entities that are bound to XML Schema or Web service definitions, use the associated attributes rather than creating an instance of the CodeIdentifiers class. For a complete list, see Attributes That Control XML Serialization.

Applies to