Question: In Visual Basic C# I keep getting an error in this part of my code TextWriter text = new StreamWriter(E:Datafile.txt, true); Below is the entire
In Visual Basic C# I keep getting an error in this part of my code TextWriter text = new StreamWriter("E:\\Data\\file.txt", true); Below is the entire code public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != null && textBox2.Text != null && textBox3.Text != null) { //Open file and append Customer Record datain the same file TextWriter text = new StreamWriter("E:\\Data\\file.txt", true); text.WriteLine(textBox1.Text); text.WriteLine(textBox2.Text); text.WriteLine(textBox3.Text); text.Close(); //Emptying textbox records after saving data textBox1.Text = textBox2.Text = textBox3.Text = ""; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
