CSharp examples for Network:IP Address
Get Wireless Mac Address List
// All Rights Reserved , Copyright (C) 2012 , Hairihan TECH, Ltd. using System.Net.NetworkInformation; using System.Net; using System.Management; using System.Collections.Generic; public class Main{ public static List<string> GetWirelessMacAddressList() {//from w w w .j a v a 2 s. co m List<string> macAddressList = new List<string>(); NetworkInterface[] networkInterfaces = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface ni in networkInterfaces) { if (ni.Description.Contains("Wireless") && ni.OperationalStatus == OperationalStatus.Up) { macAddressList.Add(ni.GetPhysicalAddress().ToString()); } } return macAddressList; } }