-
Notifications
You must be signed in to change notification settings - Fork 2
BizArk.Core.Extensions.TypeExt
Brian Brewder edited this page Apr 2, 2017
·
1 revision
Back to BizArk.Core API Reference
Provides extension methods for Type.
-
public static bool AllowNull(this Type type)- Determines if the type supports null. -
public static string GetCSharpName(this Type type)- Gets the C# name of the type. -
public static FieldInfo[] GetFields<T>(this Type type, BindingFlags flags = BindingFlags.Default)- Gets the fields that are of the specified type. -
public static Type GetTrueType(this Type type)- Gets the underlying type if the type is Nullable, otherwise just returns the type. -
public static bool Implements(this Type type, Type interfaceType)- Determines if the type implements the given interface. -
public static object Instantiate(this Type type, params object[] args)- Creates a new instance of the type. -
public static bool IsDerivedFrom(this Type type, Type baseType)- Determines if the type is derived from the given base type. -
public static bool IsDerivedFromGenericType(this Type type, Type genericType)- Determines if the type is an instance of a generic type. -
public static bool IsNumericType(this Type type)- Determines if the type corresponds to one of the built in numeric types (such as int, double, etc).