C# OpenFileDialog
private void button1_Click(object sender, EventArgs e)
{
// Show the dialog and get result.
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK) // Test result.
{
}
Console.WriteLine(result); // <-- For debugging use.
}