SetName Method

ActivityCodeDomSerializationManager.SetName Method (Object, String)


Sets the name of the specified existing Object.

Namespace:   System.Workflow.ComponentModel.Serialization
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public void SetName(
	object instance,
	string name


Type: System.Object

The Object instance to name.

Type: System.String

A String that contains the name to give the instance.

SetName provides an indirect reference to the SerializationManager method of the same name.

An exception is thrown if you try to rename an existing object or if you try to give a new object a name that is already taken. In addition, an exception is thrown if you do not pass in an existing object to the method.

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft