Get maximum value that can be assigned to the Port property in CSharp

Description

The following code shows how to get maximum value that can be assigned to the Port property.

Example


using System;//w  ww.  j  a va  2 s .c  om
using System.Net;
using System.Net.Sockets;

public class Example
{
    public static void Main()
    {
        Console.WriteLine("Maximum allowed Port Address :" + IPEndPoint.MaxPort);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Network »




IP
Web Client