IPAddress.Broadcast 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 the IP broadcast address. This field is read-only.
public: static initonly System::Net::IPAddress ^ Broadcast;
public static readonly System.Net.IPAddress Broadcast;
staticval mutable Broadcast : System.Net.IPAddress
Public Shared ReadOnly Broadcast As IPAddress
Field Value
Examples
The following example prints the Broadcast address to the console.
void PrintBroadcastAddress()
{
// Get the IP Broadcast address and convert it to string.
String^ IpAddressString = IPAddress::Broadcast->ToString();
Console::WriteLine( "\nBroadcast IP address : {0}", IpAddressString );
}
public void PrintBroadcastAddress()
{
// Get the IP Broadcast address and convert it to string.
string ipAddressString = IPAddress.Broadcast.ToString();
Console.WriteLine("Broadcast IP address: {0}", ipAddressString);
}
Public Sub PrintBroadcastAddress()
' gets the IP Broadcast address and convert it to string.
Dim IpAddressString As [String] = IPAddress.Broadcast.ToString()
Console.WriteLine((ControlChars.Cr + "Broadcast IP address : " + IpAddressString))
End Sub
Remarks
The Broadcast field is equivalent to 255.255.255.255 in dotted-quad notation.
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.