OperationalStatus Enumeration

Specifies the operational state of a network interface.

Namespace: System.Net.NetworkInformation
Assembly: System (in system.dll)

public enum OperationalStatus
public enum OperationalStatus
public enum OperationalStatus

 Member nameDescription
DormantThe network interface is not in a condition to transmit data packets; it is waiting for an external event. 
DownThe network interface is unable to transmit data packets. 
LowerLayerDownThe network interface is unable to transmit data packets because it runs on top of one or more other interfaces, and at least one of these "lower layer" interfaces is down. 
NotPresentThe network interface is unable to transmit data packets because of a missing component, typically a hardware component. 
TestingThe network interface is running tests. 
UnknownThe network interface status is not known. 
UpThe network interface is up; it can transmit data packets. 

This enumeration defines valid values for the OperationalStatus property.

The following code example displays a summary for all interfaces on the local computer.

public static void ShowInterfaceSummary()
    NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in interfaces)
        Console.WriteLine ("Name: {0}", adapter.Name);
        Console.WriteLine("  Interface type .......................... : {0}", adapter.NetworkInterfaceType);
        Console.WriteLine("  Operational status ...................... : {0}", 
        string versions ="";

        // Create a display string for the supported IP versions.
        if (adapter.Supports(NetworkInterfaceComponent.IPv4))
             versions = "IPv4";
        if (adapter.Supports(NetworkInterfaceComponent.IPv6))
            if (versions.Length > 0)
                versions += " ";
            versions += "IPv6";
        Console.WriteLine("  IP version .............................. : {0}", versions);

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0