NI-SWITCH 19.0 .NET Framework 4.0 API Reference

Table of Contents

GetService Method

  • Updated2023-02-21
  • 2 minute(s) read
GetService Method
Returns a service object on the basis of the type mentioned in the serviceType parameter.

Namespace:  NationalInstruments.ModularInstruments.NISwitch
Assembly:  NationalInstruments.ModularInstruments.NISwitch.Fx40 (in NationalInstruments.ModularInstruments.NISwitch.Fx40.dll) Version: 19.0.0.49152 (19.0.0.49152)
Visual Basic (Declaration)
Public Function GetService ( _
	serviceType As Type _
) As Object
C#
public Object GetService(
	Type serviceType
)

Parameters

serviceType
The type of the object to be retrieved.

Return Value

Type: System..::.Object
Returns an object on the basis of the type mentioned in the serviceType parameter.

Implements

IServiceProvider..::.GetService(Type)

Exceptions

ExceptionCondition
ObjectDisposedException The NISwitch.GetService method was accessed after the associated NISwitch.NISwitch object was disposed.

See Also

Log in to get a better experience