//创建一个DataTable用于存储数据,有两列:Name,Value
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("Value");
dt.Rows.Add("请选择", -1);
dt.Rows.Add("张三", 1);
dt.Rows.Add("李四", 2);
dt.Rows.Add("王五", 3);
//将Combobox绑定到DataTable,Name列显示到画面上,Value列是对应的数据
comboBox1.DataSource = dt;
comboBox1.DisplayMember = "Name";
comboBox1.ValueMember = "Value";
//在combobox的SelectedIndexChanged事件中添加如下方法
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string value = this.comboBox1.SelectedValue.ToString();
Console.WriteLine("当前选中的是 " + value);
}