NetworkInterface Class
Collapse the table of content
Expand the table of content

NetworkInterface Class

 

Provides configuration and statistical information for a network interface.

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

System.Object
  System.Net.NetworkInformation.NetworkInterface

Public MustInherit Class NetworkInterface

NameDescription
System_CAPS_protmethodNetworkInterface()

Initializes a new instance of the NetworkInterface class.

NameDescription
System_CAPS_pubpropertyDescription

Gets the description of the interface.

System_CAPS_pubpropertyId

Gets the identifier of the network adapter.

System_CAPS_pubpropertySystem_CAPS_staticIPv6LoopbackInterfaceIndex

Gets the index of the IPv6 loopback interface.

System_CAPS_pubpropertyIsReceiveOnly

Gets a Boolean value that indicates whether the network interface is set to only receive data packets.

System_CAPS_pubpropertySystem_CAPS_staticLoopbackInterfaceIndex

Gets the index of the IPv4 loopback interface.

System_CAPS_pubpropertyName

Gets the name of the network adapter.

System_CAPS_pubpropertyNetworkInterfaceType

Gets the interface type.

System_CAPS_pubpropertyOperationalStatus

Gets the current operational state of the network connection.

System_CAPS_pubpropertySpeed

Gets the speed of the network interface.

System_CAPS_pubpropertySupportsMulticast

Gets a Boolean value that indicates whether the network interface is enabled to receive multicast packets.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetAllNetworkInterfaces()

Returns objects that describe the network interfaces on the local computer.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetIPProperties()

Returns an object that describes the configuration of this network interface.

System_CAPS_pubmethodGetIPStatistics()

Gets the IP statistics for this NetworkInterface instance.

System_CAPS_pubmethodGetIPv4Statistics()

Gets the IPv4 statistics for this NetworkInterface instance.

System_CAPS_pubmethodSystem_CAPS_staticGetIsNetworkAvailable()

Indicates whether any network connection is available.

System_CAPS_pubmethodGetPhysicalAddress()

Returns the Media Access Control (MAC) or physical address for this adapter.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSupports(NetworkInterfaceComponent)

Gets a Boolean value that indicates whether the interface supports the specified protocol.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

This class encapsulates data for network interfaces, also known as adapters, on the local computer. You do not create instances of this class; the GetAllNetworkInterfaces method returns an array that contains one instance of this class for each network interface on the local computer.

The following code example displays information about interfaces.

No code example is currently available or this language may not be supported.

SecurityPermission

for executing unmanaged code. Associated enumeration: UnmanagedCode

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft