Visual Basic (Declaration) | |
---|---|
<ExtensionAttribute()> Public Shared Function GetService(Of T As Class)( _ ByVal provider As IServiceProvider _ ) As T |
Visual Basic (Usage) | ![]() |
---|---|
Dim provider As IServiceProvider Dim value As T value = SystemExtensions.GetService(Of T)(provider) |
C# | |
---|---|
[Extension()] public static T GetService<T>( IServiceProvider provider ) where T: class |
C++/CLI | |
---|---|
[Extension()] public: static T^ GetServicegeneric<typename T> ( IServiceProvider^ provider ) where T: ref class |
Parameters
- provider
Type Parameters
- T
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2