DesignerSerializationManager.IDesignerSerializationManager.SetName Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.