IPEndPoint.Port : IPEndPoint « System.Net « C# / C Sharp by API






IPEndPoint.Port

using System;
using System.Net;


class MainClass
{
    public static void Main()
    {
        IPAddress test1 = IPAddress.Parse("192.168.1.1");
      IPEndPoint ie = new IPEndPoint(test1, 8000);
    
      ie.Port = 80;
      Console.WriteLine("The changed IPEndPoint value is: {0}", ie.ToString());
    
    }
}

 








Related examples in the same category

1.new IPEndPoint(IPAddress, int port)
2.IPEndPoint.AddressFamily
3.IPEndPoint.MaxPort
4.IPEndPoint.MinPort
5.IPEndPoint.Serialize()