Broadcast Field
Collapse the table of content
Expand the table of content

IPAddress.Broadcast Field

Provides the IP broadcast address. This field is read-only.

[Visual Basic]
Public Shared ReadOnly Broadcast As IPAddress
[C#]
public static readonly IPAddress Broadcast;
[C++]
public: static IPAddress* Broadcast;
[JScript]
public static var Broadcast : IPAddress;

Remarks

The Broadcast field is equivalent to 255.255.255.255 in dotted-quad notation.

Example

[Visual Basic, C#, C++] The following example prints the Broadcast address to the console.

[Visual Basic] 
Public Sub PrintLoopbackAddress()
    ' Gets the IP loopback address and converts it to a string.
    Dim IpAddressString As [String] = IPAddress.Loopback.ToString()
    Console.WriteLine(("Loopback IP address : " + IpAddressString))
End Sub 'PrintLoopbackAddress

[C#] 
public void PrintLoopbackAddress()
{
  // Gets the IP loopback address and converts it to a string.
  String IpAddressString = IPAddress.Loopback.ToString();
  Console.WriteLine("Loopback IP address : " + IpAddressString);
}

[C++] 
void PrintLoopbackAddress() {
   // Gets the IP loopback address and converts it to a string.
   String* IpAddressString = IPAddress::Loopback->ToString();
   Console::WriteLine(S"Loopback IP address : {0}", IpAddressString);
}

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IPAddress Class | IPAddress Members | System.Net Namespace

Show:
© 2016 Microsoft