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.
- Start Visual Studio and open the solution.
- Build the PeristStreamHelper.csproj, ClonableObj.csproj, and TestApp.csproj projects.
- Make sure the TestApp.csproj project is set as the startup project (in the Solution Explorer, right-click the project and select Set as StartUp Project).
- Press F5 to run the test application. A console window appears listing the flow of the test application (note the different messages reporting the state of the original and cloned objects).
- When done, press any key to close the application.
PeristStreamHelper.cs | Helper class that provides helper methods to read and write objects to the structured stream. |
ClonableObj/ClonableObjClass.cs | An implementation of an object that implements IPersistStream using the helper class. |
ClonableObj/TestApp/Program.cs | The main entry point for the test application. |
ClonableObj/TestApp/TestClass.cs | A test class that creates an instance of the clonable object, assigns properties to it, then clones it. |
ClonableObj/TestApp/LicenseInitializer.cs | ESRI license initialize class. |
Download the files for all languages
See Also:
Implement IPersistStream in a .NET classImplementing persistence
Implementing cloning
Sample: Triangle graphic element
Sample: Clonable object
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime |
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |