Table of Contents

Class Type_CB_Extension

Namespace
System
Assembly
Cobilas.Core.dll
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

object

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

type Type
inherit bool

true to get attributes marked as inherited.

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

type Type
inherit bool

true to get attributes marked as inherited.

Returns

T[]

Type Parameters

T

The generic type used to obtain the target attribute.