IPEndPoint.Address Propriété

Définition

Obtient ou définit l'adresse IP du point de terminaison.

public:
 property System::Net::IPAddress ^ Address { System::Net::IPAddress ^ get(); void set(System::Net::IPAddress ^ value); };
public System.Net.IPAddress Address { get; set; }
member this.Address : System.Net.IPAddress with get, set
Public Property Address As IPAddress

Valeur de propriété

Instance de IPAddress contenant l'adresse IP du point de terminaison.

Exemples

L’exemple suivant définit la propriété à l’aide Address du IPAddress spécifié.

void displayEndpointInfo( IPEndPoint^ endpoint )
{
   Console::WriteLine( "Endpoint->Address : {0}", endpoint->Address );
   Console::WriteLine( "Endpoint->AddressFamily : {0}", endpoint->AddressFamily );
   Console::WriteLine( "Endpoint->Port : {0}", endpoint->Port );
   Console::WriteLine( "Endpoint.ToString() : {0}", endpoint );
   Console::WriteLine( "Press any key to continue." );
   Console::ReadLine();
}
private static void displayEndpointInfo(IPEndPoint endpoint)
{
  Console.WriteLine("Endpoint.Address : " + endpoint.Address);
  Console.WriteLine("Endpoint.AddressFamily : " + endpoint.AddressFamily);
  Console.WriteLine("Endpoint.Port : " + endpoint.Port);
  Console.WriteLine("Endpoint.ToString() : " + endpoint.ToString());

  Console.WriteLine("Press any key to continue.");
  Console.ReadLine();
}
Private Shared Sub displayEndpointInfo(ByVal endpoint As IPEndPoint)
  Console.WriteLine("Endpoint Address : " + endpoint.Address.ToString())
  Console.WriteLine("Endpoint AddressFamily : " + endpoint.AddressFamily.ToString())
  Console.WriteLine("Endpoint Port : " + endpoint.Port.ToString())
  Console.WriteLine("Endpoint ToString() : " + endpoint.ToString())

  Console.WriteLine("Press any key to continue.")
  Console.ReadLine()
End Sub

S’applique à