Connecting 2 computers over the internet should, mostly, be the same as connecting them on a LAN. Your problems will mainly be with the firewall. In your C# code, you will have to assign an IP address & port for both computers. You should ensure that your firewall will allow this port through without blocking (beware of security vulnerabilities when opening new ports).
If your computers don't have public IPs, you will also have to set up some NAT on your router. This will map a port on your router + your public IP address to your local computers IP address + port. The other computer will then configure this public IP address + port in their configuration. There is too many configurable things that have the potential to screw up to list in a single post. I'd suggest learning some basics on networks.
However, having said all that, in terms of C# code you shouldn't have to change a thing to get the program to work over the internet if it works over a LAN.