日期:2014-05-18 浏览次数:20802 次
System.Collections.Generic.Dictionary<string, string> picSource = new System.Collections.Generic.Dictionary<string, string>(); picSource.Add("图片1", "01.jpg"); picSource.Add("图片2", "02.jpg"); BindingSource bs = new BindingSource(); bs.DataSource = picSource; cbbBackPic.DataSource = bs; cbbBackPic.DisplayMember = "Key"; cbbBackPic.ValueMember = "Value";