다음을 통해 공유


ISqlActivationService.CreateInstance<T> 메서드 (Type, BindingFlags, Binder, array<Object[], CultureInfo, array<Object )

Creates an instance of the specified type using the constructor that best matches the specified parameters.

네임스페이스:  Microsoft.SqlServer.Management
어셈블리:  SqlWorkbench.Interfaces(SqlWorkbench.Interfaces.dll)

구문

‘선언
Function CreateInstance(Of T) ( _
    type As Type, _
    bindingAttr As BindingFlags, _
    binder As Binder, _
    args As Object(), _
    culture As CultureInfo, _
    activationAttributes As Object() _
) As T
‘사용 방법
Dim instance As ISqlActivationService 
Dim type As Type 
Dim bindingAttr As BindingFlags 
Dim binder As Binder 
Dim args As Object()
Dim culture As CultureInfo 
Dim activationAttributes As Object()
Dim returnValue As T

returnValue = instance.CreateInstance(type, _
    bindingAttr, binder, args, culture, _
    activationAttributes)
T CreateInstance<T>(
    Type type,
    BindingFlags bindingAttr,
    Binder binder,
    Object[] args,
    CultureInfo culture,
    Object[] activationAttributes
)
generic<typename T>
T CreateInstance(
    Type^ type, 
    BindingFlags bindingAttr, 
    Binder^ binder, 
    array<Object^>^ args, 
    CultureInfo^ culture, 
    array<Object^>^ activationAttributes
)
abstract CreateInstance : 
        type:Type * 
        bindingAttr:BindingFlags * 
        binder:Binder * 
        args:Object[] * 
        culture:CultureInfo * 
        activationAttributes:Object[] -> 'T 
JScript는 제네릭 형식 및 메서드를 지원하지 않습니다.

유형 매개 변수

  • T

매개 변수

  • type
    유형: System.Type
    The type of object to create.
  • binder
    유형: System.Reflection.Binder
    An object that uses bindingAttr and args to seek and identify the type constructor.
  • args
    유형: array<System.Object[]
    An array of arguments that match in number, order, and type the parameters of the constructor to invoke.
  • culture
    유형: System.Globalization.CultureInfo
    Culture-specific information that governs the coercion of args to the formal types declared for the type constructor.
  • activationAttributes
    유형: array<System.Object[]
    An array of one or more attributes that can participate in activation.

반환 값

유형: T
A reference to the newly created object.

참고 항목

참조

ISqlActivationService 인터페이스

CreateInstance 오버로드

Microsoft.SqlServer.Management 네임스페이스