Class Type_CB_Extension
- Namespace
- System
- Assembly
- Cobilas.Core.dll
Consecrate more methods for Type class.
public static class Type_CB_Extension
- Inheritance
-
Type_CB_Extension
- Inherited Members
Methods
Activator(Type)
Creates an instance of an object from a type.
public static object Activator(this Type type)
Parameters
type
Type
Returns
Activator<T>(Type)
Creates an instance of an object from a type.
public static T Activator<T>(this Type type)
Parameters
type
Type
Returns
- T
Type Parameters
T
GetAttribute<T>(Type)
Gets the type attribute.
public static T GetAttribute<T>(this Type type) where T : Attribute
Parameters
type
Type
Returns
- T
Type Parameters
T
The generic type used to obtain the target attribute.
GetAttribute<T>(Type, bool)
Gets the type attribute.
public static T GetAttribute<T>(this Type type, bool inherit) where T : Attribute
Parameters
Returns
- T
Type Parameters
T
The generic type used to obtain the target attribute.
GetAttributes<T>(Type)
Gets all attributes of the type.
public static T[] GetAttributes<T>(this Type type) where T : Attribute
Parameters
type
Type
Returns
- T[]
Type Parameters
T
The generic type used to obtain the target attribute.
GetAttributes<T>(Type, bool)
Gets all attributes of the type.
public static T[] GetAttributes<T>(this Type type, bool inherit) where T : Attribute
Parameters
Returns
- T[]
Type Parameters
T
The generic type used to obtain the target attribute.