DirectoryInfo info = Directory.GetParent(Environment.CurrentDirectory);
string txtDirecPath = info.Parent.FullName + "/data";
if(Directory.Exists(txtDirecPath))
{
string[] txtNameList = Directory.GetFiles(txtDirecPath);
DataTable dt = new DataTable();
DataColumn dc = new DataColumn("txtName", typeof(string));
dt.Columns.Add(dc);
foreach (string s in txtNameList)
{
DataRow dr = dt.NewRow();
dr[0] = Path.GetFileNameWithoutExtension(s);
dt.Rows.Add(dr);
}
comboBox1.ValueMember = "txtName";
comboBox1.DisplayMember = "txtName";
comboBox1.DataSource = dt;
}