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


IObjectCopy.Copy Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IO > IObjectCopy Interface > IObjectCopy.Copy Method
ArcGIS Developer Help

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
);
[C++]
Parameters
pInObject [in]

pInObject is a parameter of type IUnknown

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