T
GetRequiredService<T> Method
See Also 
SourceCode Namespace > SystemExtensions Class : GetRequiredService<T> Method



provider

Glossary Item Box

Syntax

Visual Basic (Declaration)  
<ExtensionAttribute()>
Public Shared Function GetRequiredService(Of T As Class)( _
   ByVal provider As IServiceProvider _
) As T
Visual Basic (Usage) Copy Code
Dim provider As IServiceProvider
Dim value As T
 
value = SystemExtensions.GetRequiredService(Of T)(provider)
C#  
[Extension()]
public static T GetRequiredService<T>( 
   IServiceProvider provider
)
where T: class
C++/CLI  
[Extension()]
public:
static T^ GetRequiredServicegeneric<typename T>
( 
   IServiceProvider^ provider
) 
where T: ref class

Parameters

provider

Type Parameters

T

Requirements

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

See Also