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

May 2, 2013 at 2:01 PM
hello,
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?

thanks
May 2, 2013 at 2: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");
        }
    }