本文介绍了C#:运算符'+'不能应用于'string'和'method group'类型的操作数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
messageBox.Show("student First Name: " + aryStudent[i].getFirstName + "\r\n student Last Name: " + aryStudent[i].getLastName() + "\r\n student number: " + aryNumber[i].getNumber, "student " +i.tostring(), MessageboxButtons...
"Student First Name: " +aryStudent[i].getFirstName
- 红色下划线
如果我把括号放在.getFirstName之后然后是红线涵盖.getNumber
i控制了其他一切。
将学生姓名和号码放入我班级的文本框中在TAFE
如果你看到了,请帮忙我错了
-is the red underlined
if i put the brackets after .getFirstName then the red line covers up to .getNumber
i have everything else under control.
it is to place a student name and number into a textbox for my class at TAFE
Please help if you see anything wrong
推荐答案
messageBox.Show("student First Name: " + aryStudent[i].getFirstName() + "\r\n student Last Name: " + aryStudent[i].getLastName() + "\r\n student number: " + aryNumber[i].getNumber(), "student " +i.tostring());
这篇关于C#:运算符'+'不能应用于'string'和'method group'类型的操作数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!