0

I want to make a C# tcp server and client connection. Instead of specifying the IP Address of the server in the client-side program itself, I want to use a 'Config file' which will store the IP Address and port Address of the server.And then I want the client program to fetch the IP Address of server from that 'Config file' only.

How to achieve this? Please guide.Any Suggestions will be appreciated. Thanks.

user2900761
  • 111
  • 1
  • 3
  • 15

1 Answers1

0

I solved my question by doing following steps:

  1. Instead of making a config file, I made a text file.
  2. Read the Strings from the text file by using ReadAllLines() 3.Used the fetched strings in the program.

This was quite easy and it also serves the purpose of fetching the IP Address And Port address of the server.

user2900761
  • 111
  • 1
  • 3
  • 15