CodeDomSerializerBase.GetUniqueName Method

Definition

Returns a unique name for the given object.

protected string GetUniqueName (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value);

Parameters

manager
IDesignerSerializationManager

The IDesignerSerializationManager to use for serialization.

value
Object

The object for which the name will be retrieved.

Returns

A unique name for value.

Exceptions

manager or value is null.

Remarks

The GetUniqueName method calls the GetName method. If this method does not return a name, then GetUniqueName uses INameCreationService to fabricate a valid name for the object. If the service is not available, GetUniqueName will fabricate a name based on the short type name combined with an index number to make it unique. The resulting name is associated with the serialization manager by calling the SetName method before the new name is returned.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also