s.Connect(lep);
// Using the LocalEndPoint property.
Console.WriteLine("My local IpAddress is :" + IPAddress.Parse(((IPEndPoint)s.LocalEndPoint).Address.ToString()) +
"I am connected on port number " + ((IPEndPoint)s.LocalEndPoint).Port.ToString());