語言

IPAddress.None 欄位

定義

提供一個 IP 位址,表示不應使用任何網路介面。 此欄位僅供讀取。

public: static initonly System::Net::IPAddress ^ None;
public static readonly System.Net.IPAddress None;
 staticval mutable None : System.Net.IPAddress
Public Shared ReadOnly None As IPAddress 

欄位值

範例

以下範例使用該 None 特性表示不應使用任何網路介面。

public static void Main()
{
   // Gets the IP address indicating that no network interface should be used
   // and converts it to a string.
   string address = IPAddress.None.ToString();
   Console.WriteLine("IP address : " + address);
}
Public Shared Sub Main()

    ' Gets the IP address indicating that no network interface should be used
    ' and converts it to a string. 
    Dim address As String = IPAddress.None.ToString()
    Console.WriteLine(("IP address : " + address))
End Sub

備註

此 Socket.Bind 方法使用欄位 None 表示 a Socket 必須不監聽用戶端活動。 該 None 域相當於虛點四邊形符號的 255.255.255。

適用於