IPAddress.None Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides an IP address that indicates that no network interface should be used. This field is read-only.
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
Field Value
Examples
The following example uses the None property to indicate that no network interface should be used.
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
Remarks
The Socket.Bind method uses the None field to indicate that a Socket must not listen for client activity. The None field is equivalent to 255.255.255.255 in dotted-quad notation.
Applies to
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir