This project is read-only.

Get available device, GetDevices() not work with .net framework 2..0

May 2, 2013 at 3:01 PM
the following not work
RasDevice device = RasDevice.GetDevices().Where(....);
Error 2 'System.Collections.ObjectModel.ReadOnlyCollection<DotRas.RasDevice>' does not contain a definition for 'where' and no extension method 'where' accepting a first argument of type 'System.Collections.ObjectModel.ReadOnlyCollection<DotRas.RasDevice>'
it require System.Linq that available only on .net framework 4..0

how to get available device in another way?

May 2, 2013 at 3:59 PM
Solved now
 public void GetModemName()
        ReadOnlyCollection<RasDevice> devices = RasDevice.GetDevices();
        foreach (DotRas.RasDevice modem in devices)
            if (!modem.Name.ToLower().Contains("miniport"))
                MessageBox.Show(modem.Name, "Found Modem Name");