This document is archived and information here might be outdated.  Recommended version.


IObjectCopy.Copy Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (System)  

IObjectCopy.Copy Method

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

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.

Remarks

Copy may fail if there is insufficient memory.

See Also

IObjectCopy Interface