แก้ไข

แชร์ผ่าน


DesignerSerializationManager.IDesignerSerializationManager.SetName Method

Definition

Sets the name for the specified object.

 virtual void System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SetName(System::Object ^ instance, System::String ^ name) = System::ComponentModel::Design::Serialization::IDesignerSerializationManager::SetName;
void IDesignerSerializationManager.SetName (object instance, string name);
abstract member System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SetName : obj * string -> unit
override this.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SetName : obj * string -> unit
Sub SetName (instance As Object, name As String) Implements IDesignerSerializationManager.SetName

Parameters

instance
Object

The object to set the name.

name
String

A String used as the name of the object.

Implements

Exceptions

One or both of the parameters are null.

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

This property was accessed outside of a serialization session.

Remarks

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.

Applies to

See also