DevicesToDeviceType Method |
Extension method that converts a string device name to a
DeviceType enum value.
Namespace: ASCOM.DeviceInterfaceAssembly: ASCOM.DeviceInterfaces (in ASCOM.DeviceInterfaces.dll) Version: 6.0.0.0 (6.6.9999.9999)
Syntaxpublic static DeviceType ToDeviceType(
this string device
)
<ExtensionAttribute>
Public Shared Function ToDeviceType (
device As String
) As DeviceType
public:
[ExtensionAttribute]
static DeviceType ToDeviceType(
String^ device
)
Parameters
- device String
- Device type
Return Value
DeviceTypeDeviceTypes enum value corresponding to the given string device name
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions
See Also