Hi, I am using the following code to open a file "Zl2WIN".
FileStream filestream2 = new FileStream("ZL2WIN", FileMode.Open);
BinaryFormatter bf2 = new BinaryFormatter();
Person JohnDoe = new Person();
JohnDoe = (Person)bf2.Deserialize(filestream2);
textBox7.Text = JohnDoe.CallSign;
textBox8.Text = JohnDoe.Freq;
textBox9.Text = JohnDoe.Time;
textBox10.Text = JohnDoe.fName;
textBox11.Text = JohnDoe.lName;
textBox12.Text = JohnDoe.Country;
filestream2.Close();
My question is how can I open up an open file dialog instead of defining a name in the code. Thanks.