I'm having a bit of an issue. Lets say I have 2 text boxes, one on the left with this content:
Win
Lose
Hello
Goodbye
And one on the right, with this information:
One
Two
Three
Four
Now, on button press, I want to combine these two text boxes with colon delimitation, so it would output like this:
Win:One
Lose:Two
Hello:Three
Goodbye:Four
Any idea how I can accomplish this? Nothing I have tried thus far has worked. This is my current code, sorry. I'm not trying to have you do my work for me, I'm just rather confused:
string path = Directory.GetCurrentDirectory() + @"\Randomized_List.txt";
string s = "";
StringBuilder sb = new StringBuilder();
StreamReader sr1 = new StreamReader("Randomized_UserList.txt");
string line = sr1.ReadLine();
while ((s = line) != null)
{
var lineOutput = line+":";
Console.WriteLine(lineOutput);
sb.Append(lineOutput);
}
sr1.Close();
Console.WriteLine();
StreamWriter sw1 = File.AppendText(path);
sw1.Write(sb);
sw1.Close();