Method FromDelegate
FromDelegate(TDelegate?)
Creates a PersistentFunctionPointer<TDelegate> from a delegate of type TDelegate.
Declaration
public static PersistentFunctionPointer<TDelegate> FromDelegate(TDelegate? @delegate)
Parameters
| Type | Name | Description |
|---|---|---|
| TDelegate | delegate | The delegate to create a PersistentFunctionPointer<TDelegate> from. |
Returns
| Type | Description |
|---|---|
| PersistentFunctionPointer<TDelegate> | A PersistentFunctionPointer<TDelegate> pointing to the target function represented by |
Implements
Remarks
The delegate must not be null. If it is, an ArgumentNullException will be thrown.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|