MakeUnique Method

CodeIdentifiers.MakeUnique Method (String)


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

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

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

public string MakeUnique(
	string identifier


Type: System.String

The name to modify if it is not already unique.

Return Value

Type: System.String

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

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.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft