# SaveFileDialog with c#



## kobycool (Jun 30, 2004)

hello,
i have a form with many parameters. among others i have a menu item "File" that contain 'open...' and 'Save...'
when i choose the 'Save...' option i want to save all my operation so far(it`s mean that if i change any parameter or any control). and when i do open to this file i want to see all !! my changes. 
///////////////////////////////
for exampl: in my form i have a TextBox, suppose i write anything in the text box and i save it, now i`m close all, init my program again and use 'open' option - now, i want to see my changes in the text box.
///////////////////////////////

my 'SaveFileDialog' function look like this:

this.saveFileDialog = new SaveFileDialog();
this.saveFileDialog.DefaultExt = "mddb";
this.saveFileDialog.Filter = "MDDB files (*.mddb)|*.mddb|All files (*.*)|*.*" ;
this.saveFileDialog.FilterIndex = 2 ; 
this.saveFileDialog.RestoreDirectory = true ; 

if(saveFileDialog.ShowDialog() == DialogResult.OK)
{
if((myStream = saveFileDialog.OpenFile()) != null)
{
????
myStream.Close();
}
}

? - means mabye there my problem

or whether at all should i use the Serialize(how can use it?) ?

thank you in advanced 
koby


----------

