System.Xml.Serialization.CodeIdentifiers.MakeUnique Method

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

Syntax

public string MakeUnique (string identifier)

Parameters

identifier
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 CodeIdentifiers.Add(string, object), CodeIdentifiers.AddUnique(string, object), or CodeIdentifiers.AddReserved(string) method, or if it was generated by the CodeIdentifiers.AddUnique(string, object) 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 System.Xml.Serialization.CodeIdentifiers class. For a complete list, see Attributes That Control XML Serialization.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0