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

Search Results for

    Edit this page

    Method FromDelegate

    | Edit this page View Source

    FromDelegate(TDelegate?)

    Creates a TSelf from a delegate of type TDelegate.

    Declaration
    public static abstract TSelf FromDelegate(TDelegate? @delegate)
    Parameters
    Type Name Description
    TDelegate delegate

    The delegate to create the function pointer from.

    Returns
    Type Description
    TSelf

    A TSelf pointing to the target function represented by delegate.

    Remarks

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

    Exceptions
    Type Condition
    ArgumentNullException

    delegate is null and TSelf represents a non-nullable pointer type

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