Serialize a SocketAddress from a IPEndPoint : IP Address : Network C# Examples


C# Examples » Network » IP Address »

 

Serialize a SocketAddress from a 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);
        
            SocketAddress  sa  =  ie.Serialize();
            Console.WriteLine("The  SocketAddress  is:  {0}",  sa.ToString());
        
        }
}
    
   
  
   



Output

The SocketAddress is: InterNetwork:16:{31,64,192,168,1,1,0,0,0,0,0,0,0,0}


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» IP Address