public string GetSSIDName()
{
foreach (var network in new NetworkInterfaceList())
{
if (
(network.InterfaceType == NetworkInterfaceType.Wireless80211) &&
(network.InterfaceState == ConnectState.Connected)
)
{
return network.InterfaceName;
}
}
return "<Not connected>";
}