Mocker..::..CreateInstance<(Of <(<'T>)>)> Method (array<Object>[]()[][])

Creates an instance of T. Parameter data allows matching of constructors by type and uses those values in the creation of the instance.

Namespace:  FastMoq
Assembly:  FastMoq.Core (in FastMoq.Core.dll)

Syntax


public T CreateInstance<T>(
	params Object[] args
)
Public Function CreateInstance(Of T) ( _
	ParamArray args As Object() _
) As T
public:
generic<typename T>
T CreateInstance(
	... array<Object^>^ args
)

Type Parameters

T
The Mock Type, usually an interface.

Parameters

args
Type: array<Object>[]()[][]
The optional arguments used to create the instance.

Return Value

Nullable.

Examples


C#
IFileSystem fileSystem = CreateInstance<IFileSystem>();