Share via


NSString.Copy(NSZone) Method

Definition

Performs a copy of the underlying Objective-C object.

[Foundation.Export("copyWithZone:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual Foundation.NSObject Copy(Foundation.NSZone? zone);
[<Foundation.Export("copyWithZone:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
override this.Copy : Foundation.NSZone -> Foundation.NSObject

Parameters

zone
NSZone

Developers should pass null. Memory zones are no longer used.

Returns

The newly-allocated object.

Implements

Attributes

Remarks

This method performs a "shallow copy" of this. If this object contains references to external objects, the new object will contain references to the same object.

Applies to