共用方式為


SqlCeProviderFactory.IServiceProvider.GetService 方法

取得服務類型。

命名空間:  System.Data.SqlServerCe
組件:  System.Data.SqlServerCe (在 System.Data.SqlServerCe.dll 中)

語法

'宣告
<SecurityCriticalAttribute> _
<SecurityTreatAsSafeAttribute> _
Private Function GetService ( _
    serviceType As Type _
) As Object Implements IServiceProvider.GetService
'用途
Dim instance As SqlCeProviderFactory
Dim serviceType As Type
Dim returnValue As Object

returnValue = CType(instance, IServiceProvider).GetService(serviceType)
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
Object IServiceProvider.GetService(
    Type serviceType
)
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
private:
virtual Object^ GetService(
    Type^ serviceType
) sealed = IServiceProvider::GetService
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
private abstract GetService : 
        serviceType:Type -> Object 
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
private override GetService : 
        serviceType:Type -> Object 
JScript 支援使用明確介面實作,但不支援新的宣告。

參數

傳回值

型別:System.Object
傳回 Object

實作

IServiceProvider.GetService(Type)

請參閱

參考

SqlCeProviderFactory 類別

System.Data.SqlServerCe 命名空間