Hi,
I want to create a ListBox which have list of all the available network in .NET using C# language.....please help
Thank You in Advance...
Display network list in ListBox
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Hemant KumarRank #1,202 · 1.5K reputationPosted Sep 25, 2011, 10:09 PM EDT
It is a wrapper project with managed code in c# at http://www.codeplex.com/managedwifi
It supports Windows Vista and XP SP2 (or later version).
If it is of the Printer Network please check this link
http://stackoverflow.com/questions/1018001/is-there-a-net-way-to-enumerate-all-available-network-printers
Try this: (For no Active directory)
public static int GetAllIPAndHostNames()
{
string strHostName;
// Getting Ip address of local machine...
// First get the host name of local machine.
strHostName = Dns.GetHostName();
Console.WriteLine("Local Machine's Host Name: " + strHostName);
IPHostEntry remoteIP; //using host name, get the IP address list..
IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
IPAddress[] addr = ipEntry.AddressList; int i = 0; while (i < addr.Length) { Console.WriteLine("IP Address {0}: {1} ", i, addr[i].ToString()); //HostNames remoteIP = Dns.GetHostEntry((addr[i])); Console.WriteLine("HostName {0}: {1} ", i, remoteIP.HostName); i++; } return 0; }