Set Port for an IPEndPoint : IP Address : Network C# Examples


C# Examples » Network » IP Address »

 

Set Port for an IPEndPoint









    
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());
        
        }
}
    
   
  
   



Output

The changed IPEndPoint value is: 192.168.1.1:80


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» IP Address