ReadOnlyDeviceInfoCollection.GetDeviceIds Method ()
Returns a collection of device identifiers.
Namespace: Microsoft.WindowsServerSolutions.Common.Devices
Assembly: DevicesOM (in DevicesOM.dll)
Syntax
public IEnumerable<string> GetDeviceIds()
public:
IEnumerable<String^>^ GetDeviceIds()
Public Function GetDeviceIds As IEnumerable(Of String)
Return Value
Type: System.Collections.Generic.IEnumerable<String>
An instance of IEnumerable<T>.
Examples
The following code example shows how to retrieve a collection of device identifiers.
DevicesManager dm = new DevicesManager();
dm.Connect();
ReadOnlyDeviceInfoCollection devices = dm.GetAllDevicesInfo();
IEnumerable<string> deviceIds = devices.GetDeviceIds();
foreach (string id in deviceIds)
{
Console.WriteLine("ID = {0}", id);
}
See Also
ReadOnlyDeviceInfoCollection Class
Microsoft.WindowsServerSolutions.Common.Devices Namespace
Return to top