日期:2014-05-20  浏览次数:20923 次

comboBox赋值(在线等)
this.comboBox1.Items.Clear();
  this.comboBox1.Items.Add("2010");
  this.comboBox1.Items.Add("2011");
  this.comboBox1.Items.Add("2012");
  this.comboBox1.SelectedIndex = 0;
comboBox是我自己写的,现在我要把它选中的值赋值,
public static int y = Convert.ToInt32(comboBox1.Text.ToString());
FrmAddPayStart s = new FrmAddPayStart(y);
错误提示:非静态的字段、方法或属性“Insure2.系统管理.政策设置.FrmPaystart.comboBox1”要求对象引用;
哪位好心人来帮帮我。。。


------解决方案--------------------
FrmAddPayStart?窗体名字
你就是想传值到FrmAddPayStart窗体吗?