SemPtr SemPtr
SemPtr SemPtr
Documentation generated with DocFX
Using SingulinkFX as the template

Search Results for

    Edit this page

    Method ToDelegate

    | Edit this page View Source

    ToDelegate()

    Converts the current function pointer to a delegate of type TDelegate.

    Declaration
    TDelegate? ToDelegate()
    Returns
    Type Description
    TDelegate

    A delegate of type TDelegate representing the target function.

    Remarks

    If the current function pointer type represents a non-nullable function pointer type, then the current instance must not be a null pointer. If it is, an InvalidOperationException will be thrown. Otherwise, if the current function pointer type represents a nullable function pointer type, then the current instance may be a null pointer. If it is, then the resulting delegate will be null.

    Exceptions
    Type Condition
    InvalidOperationException

    The current function pointer is a null pointer and the current function pointer type represents a non-nullable function pointer type

    © 2026 Felix Rüdiger. SemPtr and its documentation are licensed under the MIT license.