Share via


Protocol Constructors

Definition

Overloads

Name Description
Protocol(NativeHandle)
Protocol(String)

Creates an instance of Protocol by looking up the protocol by name.

Protocol(Type)

Creates an instance of the Protocol class for the specified managed type (which must represent an Objective-C protocol).

Protocol(NativeHandle)

public Protocol(ObjCRuntime.NativeHandle handle);
new ObjCRuntime.Protocol : ObjCRuntime.NativeHandle -> ObjCRuntime.Protocol

Parameters

handle
NativeHandle

Applies to

Protocol(String)

Creates an instance of Protocol by looking up the protocol by name.

public Protocol(string name);
new ObjCRuntime.Protocol : string -> ObjCRuntime.Protocol

Parameters

name
String

Name of the protocol.

Remarks

This method throws an ArgumentException if the protocol specified by name does not exist.

The GetHandle(String) method performs a similar role, except it only returns the low-level handle to the protocol.

Applies to

Protocol(Type)

Creates an instance of the Protocol class for the specified managed type (which must represent an Objective-C protocol).

public Protocol(Type type);
new ObjCRuntime.Protocol : Type -> ObjCRuntime.Protocol

Parameters

type
Type

The managed type (which must represent an Objective-C protocol).

Applies to