フォームを作る
フォームがなくても良いけど、わたしは最終的に作りたいものがあるので、
実装しちゃいます。

 
ついでに、OpenFileDialogのプロパティからFilterに拡張子を設定すると、
指定の拡張子だけが選択可能になります。
コード
参照ボタンを押すと、ダイアログが開いて
選択したファイルのファイルパスを、テキストボックスに設定します。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CreateSQL
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if(openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                textInputPath.Text = openFileDialog1.FileName;
            }
        }
    }
}




