Is it necessary to have the "All files" option in the dialogBox. I tried removing it but it won't compile. gives some sort of error

this.saveFileDialog1.Filter =
"Document Files - (*.txt)|*.txt|" +
"All files (*.*)|*.*";

Tried removing the [+ "All file ] onwards string.

this.saveFileDialog1.Filter =
"Document Files - (*.txt)|*.txt|";

gives the same prob. with openFileDialoag.

Tried it with saveFileDialog1.Filter = "doc files (*.txt)|*.txt"; without problems.

thanks, just figured it out. was placing an extra char "|" after *.txt