GetService Method
- Updated2023-02-21
- 2 minute(s) read
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
- Type: System..::.TypeThe 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
Exception | Condition |
---|---|
ObjectDisposedException | The NISwitch.GetService method was accessed after the associated NISwitch.NISwitch object was disposed. |