you can still use DataSource with DataReader

解决方案 »

  1.   

    另外一种解决方案:
    定义一个结构
    private struct cboItem
    {
    public string Name;
    public string Value;
    public override string ToString()
    {
    return Name;
    }
    }然后增加的时候
    cboItem ci=new cboItem;
    ci.Name="name";
    ci.Value="value";
    items.add(ci);
      

  2.   

    what are you using? Windows.Forms or ASP.NET?if you are using Windows.Forms, it is not a good idea to use DataReader binding like I suggested earlier