This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IO > IObjectCopy Interface > IObjectCopy.Copy Method (ArcObjects .NET 10.5 SDK) |
Obtains a new object which is a copy of the input object.
[Visual Basic .NET] Public Function Copy ( _ ByVal pInObject As Object _ ) As Object
[C#] public object Copy ( object pInObject );
[C++]
HRESULT Copy(
LPUNKNOWN pInObject,
LPUNKNOWN* pResult
);
[C++]
Parameters pInObject [in] pInObject is a parameter of type LPUNKNOWN pResult [out, retval] pResult is a parameter of type LPUNKNOWN
Used to copy an object by value. The object must support IPersistStream. Even if the object supports IClone you may still want to use Copy as it does a full copy or 'deep clone' of the object.
Copy may fail if there is insufficient memory.