So I am new to c# and WinForms and I am trying to save the contents of a textbox, all of the things I saw online were completely useless and to complete my project i need to be able to save the contents of a textbox between sessions.
Here is my code:
namespace Zero_Light_Fullstack
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
try
{
string link1 = textBox1.Text;
Process.Start("chrome", @link1);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
}
Sorry if this is messy any answer is appreciated!