IPEndPoint.MinPort フィールド

定義

Port プロパティに割り当てることができる最小値を指定します。 このフィールドは読み取り専用です。

public: int MinPort = 0;
public const int MinPort = 0;
val mutable MinPort : int
Public Const MinPort As Integer  = 0

フィールド値

Value = 0

次の例では、 プロパティを MinPort 使用して、 プロパティに割り当てることができる最小値を Port 出力します。

IPAddress^ hostIPAddress1 = (Dns::Resolve( hostString1 ))->AddressList[ 0 ];
Console::WriteLine( hostIPAddress1 );
IPEndPoint^ hostIPEndPoint = gcnew IPEndPoint( hostIPAddress1,80 );
Console::WriteLine( "\nIPEndPoint information:{0}", hostIPEndPoint );
Console::WriteLine( "\n\tMaximum allowed Port Address :{0}", IPEndPoint::MaxPort );
Console::WriteLine( "\n\tMinimum allowed Port Address :{0}", (int^)IPEndPoint::MinPort );
Console::WriteLine( "\n\tAddress Family :{0}", hostIPEndPoint->AddressFamily );

IPAddress hostIPAddress1 = (Dns.Resolve(hostString1)).AddressList[0];
Console.WriteLine(hostIPAddress1.ToString());
IPEndPoint hostIPEndPoint = new IPEndPoint(hostIPAddress1,80);
Console.WriteLine("\nIPEndPoint information:" + hostIPEndPoint.ToString());
Console.WriteLine("\n\tMaximum allowed Port Address :" + IPEndPoint.MaxPort);
Console.WriteLine("\n\tMinimum allowed Port Address :" + IPEndPoint.MinPort);
Console.WriteLine("\n\tAddress Family :" + hostIPEndPoint.AddressFamily);
Dim hostIPAddress1 As IPAddress = Dns.Resolve(hostString1).AddressList(0)
Dim hostIPEndPoint As New IPEndPoint(hostIPAddress1, 80)
Console.WriteLine((ControlChars.Cr + "IPEndPoint information:" + hostIPEndPoint.ToString()))
Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Maximum allowed Port Address :" + IPEndPoint.MaxPort.ToString()))
Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Minimum allowed Port Address :" + IPEndPoint.MinPort.ToString()))
Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Address Family :" + hostIPEndPoint.AddressFamily.ToString()))

適用対象