[]
        
(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)
Public Shared Function [New](Of T)(type As Type) As T
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)
Public Shared Function [New](type As Type) As Object
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)
Public Shared Function [New](Of T)(type As Type, initializers As Action(Of T)) As T
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