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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!