[]
        
(Showing Draft Content)

C1.WPF.TypeEx.New

New Method

New<T>(Type)

Creates a new instance of this type using the default constructor.

Declaration
public static T New<T>(this Type type)
Parameters
Type Name Description
Type type

The type.

Returns
Type Description
T

A new instance of type T.

Type Parameters
Name Description
T

New(Type)

Creates a new instance of this type using the default constructor.

Declaration
public static object New(this Type type)
Parameters
Type Name Description
Type type

The type.

Returns
Type Description
object

A new instance of type T.

New<T>(Type, Action<T>)

Creates a new instance of this type using the default constructor.

Declaration
public static T New<T>(this Type type, Action<T> initializers)
Parameters
Type Name Description
Type type

The type.

Action<T> initializers

The initializers.

Returns
Type Description
T

A new instance of type T

Type Parameters
Name Description
T