Freigeben über


IPAddress.Broadcast-Feld

Stellt die IP-Übertragungsadresse bereit. Dieses Feld ist schreibgeschützt.

Namespace: System.Net
Assembly: System (in system.dll)

Syntax

'Declaration
Public Shared ReadOnly Broadcast As IPAddress
'Usage
Dim value As IPAddress

value = IPAddress.Broadcast
public static readonly IPAddress Broadcast
public:
static initonly IPAddress^ Broadcast
public static final IPAddress Broadcast
public static final var Broadcast : IPAddress

Hinweise

Das Broadcast-Feld entspricht 255.255.255.255 im Punktformat (Dotted Quad-Notation).

Beispiel

Im folgenden Beispiel wird die Broadcast-Adresse in der Konsole ausgegeben.

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 'PrintBroadcastAddress
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);
}
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);
} //PrintBroadcastAddress

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

IPAddress-Klasse
IPAddress-Member
System.Net-Namespace