IPAddress.None Feld

Definition

Stellt eine IP-Adresse bereit, die angibt, dass keine Netzwerkschnittstelle verwendet werden soll. Dieses Feld ist schreibgeschützt.

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 

Feldwert

Beispiele

Im folgenden Beispiel wird die None -Eigenschaft verwendet, um anzugeben, dass keine Netzwerkschnittstelle verwendet werden soll.

int 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 : {0}", address );
}
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

Hinweise

Die Socket.Bind -Methode verwendet das None Feld, um anzugeben, dass eine Socket nicht auf Clientaktivität lauschen darf. Das None Feld entspricht 255.255.255.255.255 in punktted-quad Notation.

Gilt für: