ImageMan.Net Version 3 Summer 2012 Release
Clone Method
See Also  Send Feedback
DTI.ImageMan Namespace > MarkBase Class : Clone Method

Glossary Item Box

Clones this instance.


Visual Basic (Declaration) 
Public MustOverride Function Clone() As IMark
Visual Basic (Usage)Copy Code
Dim instance As MarkBase
Dim value As IMark
value = instance.Clone()
public abstract IMark Clone()
public __abstract function Clone() : IMark;
Managed Extensions for C++ 
public: abstract IMark* Clone(); 
abstract IMark^ Clone(); 

Return Value

A deep copy of a Mark.


IMPORTANT: This is abstract! This means that children need to make the call to CopySettings for the base class to copy common properties implemented by the base class.

Below is a code example that demonstrates how the MarkRectangle Clones itself. Note that it calls CopySettings on the base class!

             public override IMark Clone()
                    // Make a new MarkRectangle
                    MarkRectangle newMark = new MarkRectangle();
                    // Copy all the settings from this objects MarkBase class to the new MarkRectangle
                    base.CopySettings((IMark)newMark, this);
                    // Copy any custom settings for this particular object as well
                    newMark.Filled = _filled;
                    newMark.CornerRadius = _cornerRadius;
                    // Return the new Mark with all base and class level properties copied
                    return (newMark);


Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2014 Data Techniques, Inc. All Rights Reserved.