NetworkInterface[] NetworkInterfaces = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface NetworkIntf in NetworkInterfaces) { IPInterfaceProperties IPInterfaceProperties = NetworkIntf.GetIPProperties(); UnicastIPAddressInformationCollection UnicastIPAddressInformationCollection = IPInterfaceProperties.UnicastAddresses; foreach (UnicastIPAddressInformation UnicastIPAddressInformation in UnicastIPAddressInformationCollection) { if (UnicastIPAddressInformation.Address.AddressFamily == AddressFamily.InterNetwork) { MessageBox.Show(UnicastIPAddressInformation.Address.ToString()); } } }