This topic has not yet been rated - Rate this topic

DesignerSerializationManager.IDesignerSerializationManager.SetName Method

Sets the name for the specified object.

Namespace:  System.ComponentModel.Design.Serialization
Assembly:  System.Design (in System.Design.dll)
void IDesignerSerializationManager.SetName(
	Object instance,
	string name
)

Parameters

instance
Type: System.Object

The object to set the name.

name
Type: System.String

A String used as the name of the object.

Implements

IDesignerSerializationManager.SetName(Object, String)
ExceptionCondition
ArgumentNullException

One or both of the parameters are null.

ArgumentException

The object specified by instance already has a name, or name is already used by another named object.

InvalidOperationException

This property was accessed outside of a serialization session.

The IDesignerSerializationManager.SetName method provides a way to set the name of an existing object. This enables creation of an instance of the object through a call to the IDesignerSerializationManager.GetInstance method, avoiding the overhead of the CreateInstance method.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.