다음을 통해 공유


IPEndPoint.Address 속성

정의

엔드포인트의 IP 주소를 가져오거나 설정합니다.

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

속성 값

엔드포인트의 IP 주소가 포함된 IPAddress 인스턴스입니다.

예제

다음 예에서는 지정한 을 Address 사용하여 IPAddress 속성을 설정합니다.

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

적용 대상