open tcp socket c#

C#
Socket s = new Socket(AddressFamily.InterNetwork,   
   SocketType.Stream, ProtocolType.Tcp);  

Source

Also in C#: