NetworkInterface Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Provides information about interfaces and enables applications to control them.
Inheritance Hierarchy
System. . :: . .Object
Microsoft.SPOT.Net.NetworkInformation..::..NetworkInterface
Microsoft.SPOT.Net.NetworkInformation. . :: . .Wireless80211
Namespace: Microsoft.SPOT.Net.NetworkInformation
Assembly: Microsoft.SPOT.Net (in Microsoft.SPOT.Net.dll)
Syntax
'Declaration
Public Class NetworkInterface
public class NetworkInterface
public ref class NetworkInterface
type NetworkInterface = class end
public class NetworkInterface
The NetworkInterface type exposes the following members.
Constructors
Name | Description | |
---|---|---|
NetworkInterface | Initializes a new instance of the NetworkInterface class. |
Top
Properties
Name | Description | |
---|---|---|
DnsAddresses | Holds the DNS server address. | |
GatewayAddress | Contains the gateway address. | |
IPAddress | Holds the IP address of the network interface. | |
IsDhcpEnabled | Gets a value specifying whether DHCP is enabled for this network interfaces. | |
IsDynamicDnsEnabled | Retrieves a value indicating whether a network interface can obtain a DNS server address automatically. | |
NetworkInterfaceType | Retrieves a value specifying the type of network interface being used by the device. | |
PhysicalAddress | Gets or sets the Media Access Control (MAC) address for a network interface. | |
SubnetMask | Retrieves the network interface's subnet mask. |
Top
Methods
Name | Description | |
---|---|---|
EnableDhcp | Enables the Dynamic Host Configuration Protocol (DHCP) for service with this network interface. | |
EnableDynamicDns | Enables a network interface to obtain a DNS server address automatically. | |
EnableStaticDns | Enables a network interface to use a specific DNS server address. | |
EnableStaticIP | Enables an application to set and use a static IP address. | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAllNetworkInterfaces | Retrieves an array of all of the device's network interfaces. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ReleaseDhcpLease | Releases the DHCP lease, which releases the IP address bound to a DHCP-enabled network interface. | |
RenewDhcpLease | Renews a DHCP lease, which renews the IP address on a DHCP-enabled network interface. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
With this class, your applications can retrieve information about a device's network interface. They can also configure the interface as appropriate. For example, they can enable your device to obtain a DNS server address automatically, renew DHCP leases, or set the device to use a specific static IP address.
Note
The .NET Micro Framework does not support IPv6. If you are using IPv6 and your program attempts to get a network address or network address properties, it will throw an exception.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.