TypeExtensions Class

Provides extension methods for the Type type.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0
C#
public static class TypeExtensions
Inheritance
Object    TypeExtensions

Methods

CanAcceptValue Checks whether a value can be an instance of type when, for example, value is passed to a method with type parameter type.
GetName(Type, TypeNameKind) Gets the name of the type by the specified kind.
GetName(Type, TypeNameKind, FuncType, AssemblyName, FuncType, String) Gets the name of the type by the specified kind using custom callbacks for resolving the assembly and type names.
See the Remarks section of the GetName(Type, TypeNameKind) overload for details.
IsDelegate Gets whether the specified type is a delegate.
IsFlagsEnum Determines whether the specified type is an enum and FlagsAttribute is defined on it.
IsGenericTypeOf Gets whether the given type is a generic type of the specified genericTypeDefinition.
IsImplementationOfGenericType(Type, Type) Gets whether the given type, its base classes or interfaces implement the specified genericTypeDefinition.
IsImplementationOfGenericType(Type, Type, Type) Gets whether the given type, its base classes or interfaces implement the specified genericTypeDefinition.
IsNullable Gets whether given type is a NullableT type.
RegisterConversion(Type, Type, Conversion) Registers a Conversion from the specified sourceType to targetType.
RegisterConversion(Type, Type, ConversionAttempt) Registers a ConversionAttempt from the specified sourceType to targetType.
RegisterTypeConverterTConverter Registers a type converter for a type.

See Also