---
title: "Retriving network device information in c#."  
description: "In this blog I am demonstrating you that how to retrieve basic network device information such as network id, network name and description using c#.To"  
author: "Anonymous User"  
published: 2011-04-28  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/149/retriving-network-device-information-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# Retriving network device information in c#.

In this blog I am demonstrating you that how to retrieve basic network device information such as network id, [network name](https://answers.mindstick.com/qa/109212/why-won-t-my-printer-connect-to-my-router-s-new-ssid-after-a-network-name-change) and description using c#.

To make this program you need to import System.Net.NetworkInformation [namespace](https://www.mindstick.com/articles/12552/namespace).

```
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.NetworkInformation;namespace NetworkInformationDemo1{    class Program    {        static void Main(string[] args)        {            //Retrive all network interface using GetAllNetworkInterface() method off NetworkInterface class.            NetworkInterface [] niArr = NetworkInterface.GetAllNetworkInterfaces();            Console.WriteLine("Retriving basic information of network.\n\n");            //Display all information of NetworkInterface using foreach loop.            foreach(NetworkInterface tempNetworkInterface in niArr)            {                Console.WriteLine("Network Discription  :  " + tempNetworkInterface.Description);                Console.WriteLine("Network ID  :  " + tempNetworkInterface.Id);                Console.WriteLine("Network Name  :  " + tempNetworkInterface.Name);                Console.WriteLine("Network interface type  :  " + tempNetworkInterface.NetworkInterfaceType.ToString());                Console.WriteLine("Network Operational Status   :   " + tempNetworkInterface.OperationalStatus.ToString());                Console.WriteLine("Network Spped   :   " + tempNetworkInterface.Speed);                Console.WriteLine("Support Multicast   :   " + tempNetworkInterface.SupportsMulticast);                Console.WriteLine();            }        }    }}
```

##### Output of the following code snippet is as follows:

Retriving basic information of network.

Network Discription : Realtek PCIe GBE Family [Controller](https://www.mindstick.com/blog/273/passing-values-from-controller-to-view-in-asp-dot-net-mvc)\
Network ID : {80F43380-546G-44E2-B957-28ED63C5570C}\
Network Name : Local Area [Connection](https://www.mindstick.com/articles/13012/what-makes-ethernet-connection-better-than-wifi)\
[Network interface](https://answers.mindstick.com/qa/102411/what-role-does-a-network-interface-card-play-in-connectivity) type : Ethernet\
Network [Operational](https://answers.mindstick.com/qa/94144/how-many-days-was-chandrayaan-1-operational) Status : Up\
Network Spped : 100000000\
Support [Multicast](https://www.mindstick.com/blog/150/multicast-delegate-in-c-sharp) : True

Network Discription : [Software](https://www.mindstick.com/articles/311636/best-freelancing-websites-to-get-software-development-services) Loopback Interface 1\
Network ID : {846EE342-7039-11DE-9D20-8067039E6963}\
Network Name : Loopback Pseudo-Interface 1\
Network interface type : Loopback\
Network Operational Status : Up\
Network Spped : 1073741824\
Support Multicast : True

Network Discription : [Microsoft](https://www.mindstick.com/articles/12301/microsoft-is-trying-to-kill-passwords) ISATAP Adapter\
Network ID : {8C7354CF-749A-40F5-8303-28ED63C5570C}\
Network Name : isatap.local.lan\
Network interface type : Tunnel\
Network Operational Status : Down\
Network Spped : 100000\
Support Multicast : False

Network Discription : Teredo Tunneling Pseudo-Interface\
Network ID : {64BC6894-4D6D-4456-9B12-4D6D33032920}\
Network Name : Local Area Connection* 9\
Network interface type : Tunnel\
Network Operational Status : Down\
Network Spped : 100000\
Support Multicast : False

---

Original Source: https://www.mindstick.com/blog/149/retriving-network-device-information-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
