I am currently developing an application in C #, I need to recover the values of socks from a txt file here are the information in the txt file
104.131.163.123:2541
104.131.178.167:2541
I need to read the file line by line for each row and retrieve the value of the IP and the port value and put them in a list
this my code :
I need to read the file line by line for each row and retrieve the value of the IP and the port value and put them in a list this is my code
List<string[]> list = new List<string[]>();
StreamReader sr = new StreamReader (@"C:\");
string line;
while ((line = sr.ReadLine()) != null)`enter code here`
{
string[] array = line.Spit(":");
list.Add(array);
}
Thank you