命名空间: Microsoft.VisualStudio.ComponentModelHost
程序集: Microsoft.VisualStudio.ComponentModelHost(在 Microsoft.VisualStudio.ComponentModelHost.dll 中)
语法
声明
Function GetService(Of T As Class) As T
T GetService<T>()
where T : class
generic<typename T>
where T : ref class
T GetService()
abstract GetService : unit -> 'T when 'T : not struct
JScript 不支持泛型类型或方法。
类型参数
- T
返回值
类型:T
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。