GetService Method
Collapse the table of content
Expand the table of content

IServiceProvider.GetService Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the service object of the specified type.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Object GetService(
	Type serviceType
)

Parameters

serviceType
Type: System.Type
An object that specifies the type of service object to get.

Return Value

Type: System.Object
A service object of type serviceType.
-or-
null if there is no service object of type serviceType.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft