ActivatorUtilities.CreateInstance Method
Instantiate an object of the given type, using constructor service injection if possible.
Namespace: Microsoft.Owin.Hosting.Services
Assembly: Microsoft.Owin.Hosting (in Microsoft.Owin.Hosting.dll)
Syntax
'Declaration
Public Shared Function CreateInstance ( _
services As IServiceProvider, _
type As Type _
) As Object
'Usage
Dim services As IServiceProvider
Dim type As Type
Dim returnValue As Object
returnValue = ActivatorUtilities.CreateInstance(services, _
type)
public static Object CreateInstance(
IServiceProvider services,
Type type
)
public:
static Object^ CreateInstance(
IServiceProvider^ services,
Type^ type
)
static member CreateInstance :
services:IServiceProvider *
type:Type -> Object
public static function CreateInstance(
services : IServiceProvider,
type : Type
) : Object
Parameters
- services
Type: System.IServiceProvider
- type
Type: System.Type
Return Value
Type: System.Object
Returns Object.