arcobjects,arcengine中克隆一个对象Clone

delphi

//根据原始GeoMetry拷贝GeoMetry

function CopyGeoMetry(PGeoMetry: IGeoMetry): IGeoMetry;
var

    pClone                              : IClone;
    CopyClone                           : IClone;

begin
    pClone := PGeoMetry as IClone;
    pClone.Clone(CopyClone);
    result := CopyClone as IGeoMetry;

end;

C#

    //根据原始GeoMetry拷贝GeoMetry

 

        public static IGeometry CopyGeoMetry(IGeometry PGeoMetry)

        {

            IClone pClone = PGeoMetry as IClone;

            IGeometry copyGeoMetry = pClone.Clone() as IGeometry;

            return copyGeoMetry;

        }


 

你可能感兴趣的:(function,C#,Delphi)