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