IPEndPoint.MaxPort フィールド
アセンブリ: System (system.dll 内)


MaxPort プロパティを使用して、Port プロパティに割り当てることができる最大値を出力する例を次に示します。
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()))
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);
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 );

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- IPEndPoint.MaxPort フィールドのページへのリンク