Altough the class that Hack showed will work, I would actually recommend learning how TCP connectivity in .Net works rather than using pre-made components.

The two main classes you will use are System.Net.Sockets.TcpListener and System.Net.Sockets.TcpClient, the first one provides the server functionallity, listening to a specified port. The second one provides the client functionally, that is connecting to a remote IP.

Heres a good thread to read through.