Sooo,我不断收到错误消息:
“object”不包含“text”的定义,并且找不到接受“object”类型的第一个参数的扩展方法“text”(您是否缺少 using 指令或程序集引用?)
对于下面的代码 - 谁能告诉我为什么?
private void cboDataSets_SelectedIndexChanged(object sender, EventArgs e)
{
int cats = Int16.Parse(cboDataSets.SelectedItem.text);
lblGenerateSelection.Text = ("you have selected " + (20 - cats) + "cats you'd like to adopt");
}