Here is the open code Im working with:
private void button6_Click(object sender, EventArgs e)
{
openFileDialog1.InitialDirectory = "C:";
openFileDialog1.Title = "Open a File";
openFileDialog1.FileName = "";
openFileDialog1.Filter = "Text Files|*.txt";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
using (StreamReader reader = new StreamReader(openFileDialog1.FileName))
{
textBox1.Text = reader.ReadToEnd();
textBox2.Text = reader.ReadToEnd();
}
}
}
And here is the save code Im working with:
private void button7_Click(object sender, EventArgs e)
{
StreamWriter sw = new StreamWriter("C:\\test.txt");
sw.WriteLine(textBox1.Text);
sw.WriteLine(textBox2.Text);
sw.Close();
}
This post has been edited by kytro360: 09 August 2011 - 11:42 AM

New Topic/Question
This topic is locked



MultiQuote









|