Most of the Cocoa API is exposed throught .NET classes, so it is rarely needed to performs hand-written operation. Altough, in certain cases, it is necessary to performs some low-level operations as they are not available.

Explicit Messaging

To perform explicit messaging, just follow the Objective-C convention, which means passing the target, the message to call and the list of arguments. Here are some examples :

// A call to "alloc" (the return type is IntPtr)
this.NativePointer = ObjectiveCRuntime.SendMessage<IntPtr>(MappedClass, "alloc");

// A call to "count" (the return type is uint)
uint cound = this.SendMessage<uint>(this, "count");

Calling Super

As Monobjc provides wrappers around native objects, a call to native super instance cannot be done by using the base keyword, but must be done according to the Objective-C convention, which means passing the target, the class of the target, the message to call and the list of arguments. Here are some examples :

// A call to super "drawRect:" (the return type is void)
this.SendMessageSuper(MappedClass, "drawRect:", rect);

// A call to super "initWithFrame:" (the return type is IntPtr)
this.SendMessageSuper<Id>(MappedClass, "initWithFrame:", frame);