Search Results for

    Show / Hide Table of Contents

    Class TypeExtension

    Defines extension methods for the Type class

    Inheritance
    System.Object
    TypeExtension
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data
    Assembly: TimeCockpit.Data.dll
    Syntax
    public static class TypeExtension

    Methods

    HasEqualBaseType(Type, Type)

    Determines whether if two types are equal or, if nullable, have the same basetype.

    Declaration
    public static bool HasEqualBaseType(this Type sourceType, Type typeToCompare)
    Parameters
    Type Name Description
    System.Type sourceType

    Type of the source.

    System.Type typeToCompare

    The type to compare.

    Returns
    Type Description
    System.Boolean

    true if the types are equal or, if nullable, have the same base types; otherwise, false.

    IsNullableType(Type)

    Gets a value indicating whether type is a generic type and the generic type for type is Nullable<>

    Declaration
    public static bool IsNullableType(this Type type)
    Parameters
    Type Name Description
    System.Type type

    Type to check

    Returns
    Type Description
    System.Boolean

    true if type is a generic type and the generic type for type is Nullable<>, otherwise false.

    In This Article
    Back to top Copyright © 2020 software architects gmbh