Well everything was going great until I clicked on cancle lol ok here goes...
When I click on the file open in my program and then decide I dont want to open something I get an error below is the code I used for the open dialog box in C#
private void menuFileOpen_Click(object sender, System.EventArgs e)
{
// for opening file
openFileDialog1 = new OpenFileDialog();
openFileDialog1.ShowDialog();
StreamReader sr = new StreamReader(openFileDialog1.FileName);
richTextBox1.Text = sr.ReadToEnd();
sr.Close();
}
Now when I click on the cancel button it gives me this error
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: Empty path name is not legal.