MonoTouch.Foundation.NSObject.Retain Method
This will send the Objective-C 'retain' message to the object.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.Obsolete("Low-level API warning: Use at your own risk: this calls the Retain method on the underlying object; Use DangerousRetain to avoid this warning")]
public NSObject Retain ()

Returns

The same object. This allows for chaining calls like this: obj.Retain ().Autorelease ()

Remarks

This is intended to be used when an autoreleased object must be returned to Objective-C code:

C# Example

[Export ("copyWithZone:")]
public override NSObject CopyWithZone (NSZone zone)
{
    return this.Clone ().Retain ().Autorelease ();
}

Requirements

Namespace: MonoTouch.Foundation
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0