DataSet ds = new DataSet(); ds.ReadXml(@"c:\code.xml"); comboBox1.DisplayMember = "value"; comboBox1.ValueMember = "ID"; comboBox1.DataSource = ds.Tables[0];配置文件格式如下: