NShape Reference
Clone Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape > Shape Class >

NShape Reference
Clone Method

Previous pageReturn to chapter overviewNext page

Creates a clone of the shape.


public abstract Shape Clone()


The clone is a deep copy of the shape in the sense that it clones all composite instances, for example all child shapes. The clone has references to the same template, model object and styles as the source has. The clone does not have the connections of the source.

Clone is implemented by creating an empty shape of the same type with the template of the cloned instance, using CopyFrom to copy all its properties.

Return Value

A copy of the shape.


public override Shape Clone() {
 Shape result = new Diamond(Type, this.Template);


 return result;


See Also

Template Property

CopyFrom Method