Or you should use the IP, or you should use the DNS name of the server.
But if what you want is to connect to a game server in the local network, you may want to use IP broadcasting. I am not sure if TCP/IP allows this, but UDP allows it.
You may then want to use both, something like this:
Server starts to listen to broadcast messages.
As soon as it receives a client message (a broadcast message that says the client is there), it gets the IP of that client and sends another UPD message (so the client can check if it is the server message).
The client then connects to another port of such server. Note that the server message may include such port.
See the UdpClient.EnableBroadcast at http://msdn.microsoft.com/en-us/library/system.net.sockets.udpclient.enablebroadcast.aspx