string P_Str_cmdtxt = String.Empty;
string P_Str_selectcondition = this.toolStripComboBox1.Items[this.toolStripComboBox1.SelectedIndex].ToString();
这句出现异常InvalidArgument=“-1”的值对于“index”无效。
参数名: index请问是什么原因?
string P_Str_selectcondition = this.toolStripComboBox1.Items[this.toolStripComboBox1.SelectedIndex].ToString();
这句出现异常InvalidArgument=“-1”的值对于“index”无效。
参数名: index请问是什么原因?
用-1做數組索引,當然出錯
if (toolStripComboBox1.SelectedIndex!-1)
string P_Str_selectcondition = toolStripComboBox1.Items[toolStripComboBox1.SelectedIndex].ToString();
string P_Str_selectcondition = toolStripComboBox1.Items[toolStripComboBox1.SelectedIndex].ToString();
string P_Str_selectcondition = toolStripComboBox1.Items[toolStripComboBox1.SelectedIndex].ToString();
这样用就会提示说"嵌入的语句不能是声明或标记语句"
string P_Str_selectcondition = toolStripComboBox1.Items[toolStripComboBox1.SelectedIndex].ToString();
这样用就会提示说"嵌入的语句不能是声明或标记语句"