in this example:
I want the "BrugerID" to be replaced with a variable. The variable should be a user input.
In my perfect dream world the lines should be like this:
I can't get my head around the logic here, I'm very new to c# - so how do I make this possible?
Code:
using (StreamWriter sw = new StreamWriter("D:\\BrugerID.txt", true))
In my perfect dream world the lines should be like this:
Code:
string fileNameToWrite = Console.ReadLine();
using (StreamWriter sw = new StreamWriter("D:\\{0}.txt",fileNameToWrite, true))
{
//do something.
}
Comment