Clonable object


Purpose
This sample demonstrates a clonable object that implements the IClone interface. This sample supplements the "Implement cloning" topic (refer to the "See Also" link at the bottom of this sample). This sample creates an instance of a user-defined clonable object that has managed and unmanaged class members, then the test application clones the object, and reports the values of class members from original and cloned objects in a console window.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio and open the solution.
  2. Build the solution to make the ClonableObject class library and the TestApp test application.
  3. Right-click the project and choose Set as Startup Project to ensure the TestApp project is the startup project for the solution.
  4. Press F5 to start the application (review the messages that show in the console window).

ClonableObjClass.cs Implementation file of the ClonableObject.
TestApp/LicenseInitializer.cs ArcGIS license initialization class implementation.
TestApp/Program.cs Test application's main entry point.
TestApp/TestClass.cs Test class that creates and clones the clonable object.
Download the C# files
ClonableObjClass.vb Implementation file of the ClonableObject.
TestApp/LicenseInitializer.vb ArcGIS license initialization class implementation.
TestApp/Program.vb Test application's main entry point.
TestApp/TestClass.vb Test class that creates and clones the clonable object.
Download the VB.NET files

Download the files for all languages

See Also:

Implementing cloning




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo