I am fairly new to C# Here I want to get the contents of List.txt and replace the GUID and Password from the list. The objective here is to replace the GUID and PASSWORD from each each line from the file List.txt List Format:
[email protected],Funkie312
[email protected],Knuanh141
[email protected],jUbskj371
NOTE: I encrypt the data but this is just an example.
public class Log
{
private const string UserList = @"C:\Server\UserManagement\list.txt";
string contents = File.ReadLines(GUID);
string contents = File.ReadLines(PASSWORD);
private static readonly string URL = "https://www.mypersonaldomain.com/account/verify?guid=" + GUID + "&" + PASSWORD;
Update from comments
I need to take the contents list from the file List.txt and replace that in the
private static readonly string URL = "https://www.mypersonaldomain.com/account/verify?guid=" + GUID + "&" + PASSWORD;
I only need to replace
GUID
andPASSWORD
but I do not know how to tell the code to read from the file andGUID
,PASSWORD
is seperated like [email protected],Knuanh141 in the List.txt
Additional Resources
String.Split Method
Enumerable.Select Method
$ - string interpolation (C# Reference)