Method FromDelegate
FromDelegate<TDelegate>(TDelegate)
Creates a FunctionPointer<TDelegate> from a delegate of type TDelegate.
Declaration
public static FunctionPointer<TDelegate> FromDelegate<TDelegate>(TDelegate @delegate) where TDelegate : notnull, Delegate
Parameters
| Type | Name | Description |
|---|---|---|
| TDelegate | delegate | The delegate to create a FunctionPointer<TDelegate> from. |
Returns
| Type | Description |
|---|---|
| FunctionPointer<TDelegate> | A FunctionPointer<TDelegate> pointing to the target function represented by |
Type Parameters
| Name | Description |
|---|---|
| TDelegate | The type of the delegate representing the signature of the target function that the resulting FunctionPointer<TDelegate> will point to. |
Remarks
The delegate must not be null. If it is, an ArgumentNullException will be thrown.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|