开发者

populate combox on windows mobile 5.0

开发者 https://www.devze.com 2022-12-26 21:32 出处:网络
I tr开发者_如何学Cy populate combobox in windows mobile 5.0 pocket pc but i have this error: Value does not fall within the expected range.

I tr开发者_如何学Cy populate combobox in windows mobile 5.0 pocket pc but i have this error:

Value does not fall within the expected range.

the datatable return from dataset on the webservice:

the method is:

public void loadComboBox(ref ComboBox ComboBoxGen, string DisplayText, string Value,DataTable dt)
{
    ComboBoxGen.DataSource = dt;
    ComboBoxGen.DisplayMember = DisplayText;
    ComboBoxGen.ValueMember = Value;
}


  1. Does the DataTable have data in it?
  2. Is the DataTable null?
  3. What values are you passing in for Value and DisplayText?
  4. Why aren't you value-checking your parameters before using them?
  5. Why aren't you using camelCase for your variables as is the recommended standard?
  6. Why are you passing in a reference to a reference type in your method, rather than just the object?
0

精彩评论

暂无评论...
验证码 换一张
取 消