The type of service to get
GetService<T> Method (IServiceContainer)
Gets the service instance registered by type. For a full list of available services, see the remarks on ServiceContainer
Syntax
T GetService<T>()

Type Parameters

T
The type of service to get

Return Value

The service instance, unique to this IServiceContainer instance
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