Table of Contents

Method CreateEmpty

Namespace
DisCatSharp.Common.Utilities
Assembly
DisCatSharp.Common.dll

CreateEmpty(Type)

Creates an empty, uninitialized instance of specified type.

This method will not call the constructor for the specified type. As such, the object might not be properly initialized.

public static object CreateEmpty(this Type t)

Parameters

t Type

Type of the object to instantiate.

Returns

object

Empty, uninitialized object of specified type.

Remarks

This method is intended for reflection use only.

CreateEmpty<T>()

Creates an empty, uninitialized instance of type T.

This method will not call the constructor for type T. As such, the object might not be properly initialized.

public static T CreateEmpty<T>()

Returns

T

Empty, uninitialized object of specified type.

Type Parameters

T

Type of the object to instantiate.

Remarks

This method is intended for reflection use only.