Show / Hide Table of Contents

Class TypeHelper

Inheritance
object
TypeHelper
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Reflection
Assembly: Volo.Abp.Core.dll
Syntax
public static class TypeHelper

Methods

ConvertFrom(Type, object)

Declaration
public static object ConvertFrom(Type targetType, object value)
Parameters
Type Name Description
Type targetType
object value
Returns
Type Description
object

ConvertFromString(Type, string?)

Declaration
public static object? ConvertFromString(Type targetType, string? value)
Parameters
Type Name Description
Type targetType
string value
Returns
Type Description
object

ConvertFromString<TTargetType>(string)

Declaration
public static object? ConvertFromString<TTargetType>(string value)
Parameters
Type Name Description
string value
Returns
Type Description
object
Type Parameters
Name Description
TTargetType

ConvertFrom<TTargetType>(object)

Declaration
public static object ConvertFrom<TTargetType>(object value)
Parameters
Type Name Description
object value
Returns
Type Description
object
Type Parameters
Name Description
TTargetType

GetDefaultValue(Type)

Declaration
public static object? GetDefaultValue(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
object

GetDefaultValue<T>()

Declaration
public static T? GetDefaultValue<T>()
Returns
Type Description
T
Type Parameters
Name Description
T

GetFirstGenericArgumentIfNullable(Type)

Declaration
public static Type GetFirstGenericArgumentIfNullable(this Type t)
Parameters
Type Name Description
Type t
Returns
Type Description
Type

GetFullNameHandlingNullableAndGenerics(Type)

Declaration
public static string GetFullNameHandlingNullableAndGenerics(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
string

GetSimplifiedName(Type)

Declaration
public static string GetSimplifiedName(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
string

IsDefaultValue(object?)

Declaration
public static bool IsDefaultValue(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool

IsDictionary(Type, out Type?, out Type?)

Declaration
public static bool IsDictionary(Type type, out Type? keyType, out Type? valueType)
Parameters
Type Name Description
Type type
Type keyType
Type valueType
Returns
Type Description
bool

IsEnumerable(Type, out Type?, bool)

Declaration
public static bool IsEnumerable(Type type, out Type? itemType, bool includePrimitives = true)
Parameters
Type Name Description
Type type
Type itemType
bool includePrimitives
Returns
Type Description
bool

IsFloatingType(Type, bool)

Declaration
public static bool IsFloatingType(Type type, bool includeNullable = true)
Parameters
Type Name Description
Type type
bool includeNullable
Returns
Type Description
bool

IsFunc(object?)

Declaration
public static bool IsFunc(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool

IsFunc<TReturn>(object?)

Declaration
public static bool IsFunc<TReturn>(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Type Parameters
Name Description
TReturn

IsNonNullablePrimitiveType(Type)

Declaration
public static bool IsNonNullablePrimitiveType(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
bool

IsNullable(Type)

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

IsPrimitiveExtended(Type, bool, bool)

Declaration
public static bool IsPrimitiveExtended(Type type, bool includeNullables = true, bool includeEnums = false)
Parameters
Type Name Description
Type type
bool includeNullables
bool includeEnums
Returns
Type Description
bool

StripNullable(Type)

Declaration
public static Type StripNullable(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
Type
In this article
Back to top Powered by Volosoft