System.Xml.Serialization.CodeIdentifiers.IsInUse Method

Determines whether a specified name is already being used within the System.Xml.Serialization.CodeIdentifiers instance's scope.

Syntax

public bool IsInUse (string identifier)

Parameters

identifier
The name to check for use within the System.Xml.Serialization.CodeIdentifiers instance's scope.

Returns

true if the name is already in use; otherwise, false.

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 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