System.Windows.Forms.OpenFileDialog ofd;
if (ofd.ShowDialog() == DialogResult.OK)
{
string File = ofd.FileName;
}
[supplemental]
As per your request with adding the reference:
See
help article (scroll down a little bit, you'll see)
it will help you with adding the reference,
[/supplemental]
Cheers,
Edo