using System;
using System.Windows.Forms;
class MainClass {
staticvoid Main(string[] args) {
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "Rich Text Files (*.rtf)|*.RTF|" +
"All files (*.*)|*.*";
if (dlg.ShowDialog() == DialogResult.OK) {
Console.WriteLine(dlg.FileName);
}
}
}