Show / Hide Table of Contents

    Class TypeExtensions

    Represents the type extensions.

    Inheritance
    Object
    TypeExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Platform.Reflection
    Assembly: Platform.Reflection.dll
    Syntax
    public static class TypeExtensions

    Fields

    | Improve this Doc View Source

    DefaultDelegateMethodName

    The default delegate method name.

    Declaration
    public static readonly string DefaultDelegateMethodName
    Field Value
    Type Description
    String
    | Improve this Doc View Source

    StaticMemberBindingFlags

    The static.

    Declaration
    public static readonly BindingFlags StaticMemberBindingFlags
    Field Value
    Type Description
    BindingFlags

    Methods

    | Improve this Doc View Source

    CanBeNumeric(Type)

    Determines whether can be numeric.

    Declaration
    public static bool CanBeNumeric(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    GetAssembly(Type)

    Gets the assembly using the specified type.

    Declaration
    public static Assembly GetAssembly(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Assembly

    The assembly

    | Improve this Doc View Source

    GetBaseType(Type)

    Gets the base type using the specified type.

    Declaration
    public static Type GetBaseType(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Type

    The type

    | Improve this Doc View Source

    GetDelegateCharacteristics(Type, out Type, out Type[])

    Gets the delegate characteristics using the specified delegate type.

    Declaration
    public static void GetDelegateCharacteristics(this Type delegateType, out Type returnType, out Type[] parameterTypes)
    Parameters
    Type Name Description
    Type delegateType

    The delegate type.

    Type returnType

    The return type.

    Type[] parameterTypes

    The parameter types.

    | Improve this Doc View Source

    GetDelegateParameterTypes(Type)

    Gets the delegate parameter types using the specified delegate type.

    Declaration
    public static Type[] GetDelegateParameterTypes(this Type delegateType)
    Parameters
    Type Name Description
    Type delegateType

    The delegate type.

    Returns
    Type Description
    Type[]

    The type array

    | Improve this Doc View Source

    GetDelegateReturnType(Type)

    Gets the delegate return type using the specified delegate type.

    Declaration
    public static Type GetDelegateReturnType(this Type delegateType)
    Parameters
    Type Name Description
    Type delegateType

    The delegate type.

    Returns
    Type Description
    Type

    The type

    | Improve this Doc View Source

    GetFirstField(Type)

    Gets the first field using the specified type.

    Declaration
    public static FieldInfo GetFirstField(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    FieldInfo

    The field info

    | Improve this Doc View Source

    GetGenericMethod(Type, String, Type[], Type[])

    Gets the generic method using the specified type.

    Declaration
    public static MethodInfo GetGenericMethod(this Type type, string name, Type[] genericParameterTypes, Type[] argumentTypes)
    Parameters
    Type Name Description
    Type type

    The type.

    String name

    The name.

    Type[] genericParameterTypes

    The generic parameter types.

    Type[] argumentTypes

    The argument types.

    Returns
    Type Description
    MethodInfo

    The method.

    | Improve this Doc View Source

    GetSignedVersionOrNull(Type)

    Gets the signed version or null using the specified unsigned type.

    Declaration
    public static Type GetSignedVersionOrNull(this Type unsignedType)
    Parameters
    Type Name Description
    Type unsignedType

    The unsigned type.

    Returns
    Type Description
    Type

    The type

    | Improve this Doc View Source

    GetStaticFieldValue<T>(Type, String)

    Gets the static field value using the specified type.

    Declaration
    public static T GetStaticFieldValue<T>(this Type type, string name)
    Parameters
    Type Name Description
    Type type

    The type.

    String name

    The name.

    Returns
    Type Description
    T

    The

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    GetStaticPropertyValue<T>(Type, String)

    Gets the static property value using the specified type.

    Declaration
    public static T GetStaticPropertyValue<T>(this Type type, string name)
    Parameters
    Type Name Description
    Type type

    The type.

    String name

    The name.

    Returns
    Type Description
    T

    The

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    GetUnsignedVersionOrNull(Type)

    Gets the unsigned version or null using the specified signed type.

    Declaration
    public static Type GetUnsignedVersionOrNull(this Type signedType)
    Parameters
    Type Name Description
    Type signedType

    The signed type.

    Returns
    Type Description
    Type

    The type

    | Improve this Doc View Source

    IsFloatPoint(Type)

    Determines whether is float point.

    Declaration
    public static bool IsFloatPoint(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsGeneric(Type)

    Determines whether is generic.

    Declaration
    public static bool IsGeneric(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsGeneric(Type, Type)

    Determines whether is generic.

    Declaration
    public static bool IsGeneric(this Type type, Type genericTypeDefinition)
    Parameters
    Type Name Description
    Type type

    The type.

    Type genericTypeDefinition

    The generic type definition.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsNullable(Type)

    Determines whether is nullable.

    Declaration
    public static bool IsNullable(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsNumeric(Type)

    Determines whether is numeric.

    Declaration
    public static bool IsNumeric(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsSigned(Type)

    Determines whether is signed.

    Declaration
    public static bool IsSigned(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsSubclassOf(Type, Type)

    Determines whether is subclass of.

    Declaration
    public static bool IsSubclassOf(this Type type, Type superClass)
    Parameters
    Type Name Description
    Type type

    The type.

    Type superClass

    The super.

    Returns
    Type Description
    Boolean

    The bool

    | Improve this Doc View Source

    IsValueType(Type)

    Determines whether is value type.

    Declaration
    public static bool IsValueType(this Type type)
    Parameters
    Type Name Description
    Type type

    The type.

    Returns
    Type Description
    Boolean

    The bool

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX