RasDevice.GetDeviceByName Method (String, RasDeviceType)

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Returns the first device matching the name and device type specified.

Namespace: DotRas
Assembly: DotRas (in DotRas.dll) Version: 1.3.5166.33435 (1.3.0.0)

Syntax

C#
[ObsoleteAttribute("This method will be removed in a future version, please use the GetDevices method to find the devices.", 
	false)]
public static RasDevice GetDeviceByName(
	string name,
	RasDeviceType deviceType
)
Visual Basic
<ObsoleteAttribute("This method will be removed in a future version, please use the GetDevices method to find the devices.", 
	false)> 
Public Shared Function GetDeviceByName ( 
	name As String,
	deviceType As RasDeviceType
) As RasDevice
Visual C++
public:
[ObsoleteAttribute(L"This method will be removed in a future version, please use the GetDevices method to find the devices.", 
	false)]
static RasDevice^ GetDeviceByName(
	String^ name, 
	RasDeviceType deviceType
)
F#
[<ObsoleteAttribute("This method will be removed in a future version, please use the GetDevices method to find the devices.", 
	false)>]
static member GetDeviceByName : 
        name : string * 
        deviceType : RasDeviceType -> RasDevice 

Parameters

name
Type: System..::..String
The name of the device to retrieve.
deviceType
Type: DotRas..::..RasDeviceType
The RasDeviceType of the device to retrieve.

Return Value

Type: RasDevice
The RasDevice if available, otherwise a null reference (Nothing in Visual Basic).

See Also