Get an instance used for wrapped constructor type objects.

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static T GetInstance<T>(
	params Object[] args
)
where T : class
Visual Basic
Public Shared Function GetInstance(Of T As Class) ( 
	ParamArray args As Object()
) As T
Visual C++
public:
generic<typename T>
where T : ref class
static T GetInstance(
	... array<Object^>^ args
)
F#
static member GetInstance : 
        args : Object[] -> 'T  when 'T : not struct

Parameters

args
Type: array<System..::..Object>[]()[][]
Constructor arguments

Type Parameters

T
Object type

Return Value

Type: T
Object instance

Remarks

Returns an instance of the object, wraps the constructor to allow for encapsulated instatiation, so the logic in he constructor can be changed without changing the client code. Reference: http://www.netobjectives.com/ezines/ez0405NetObj_PerspectivesOfUseVsCreationInOODesign.pdf

See Also