I'm sure this is really simple to do but i'm struggling.
private void button1_Click(object sender, EventArgs e)
{
SaveBtn();
void SaveBtn()
{
string savetext = textBox1.Text;
string savetext2 = textBox2.Text;
File.AppendAllText(@"C:\Riot Games\AccountSwitcher.txt", savetext + Environment.NewLine + savetext2 + Environment.NewLine + Environment.NewLine);
MessageBox.Show("Your ID: " + savetext + " and you PWD: " + savetext2 + " has been saved.");
}
}
As you can see i have 2 textbox and when i'm clicking the button "save" both input are saved into a file.txt. This code works like a charm but i'd rather save these 2 inputs into an array so i could use them individually.
Thanks your help, i'm pretty noob as you can see so please keep it simple :D <3