【发布时间】:2013-08-10 17:46:14
【问题描述】:
我的程序中不断出现以下错误:
'System.Windows.Forms.TextBox.Text' is a 'property' but used like a 'method'
和
Non-invocable member 'System.Windows.Forms.Control.Text' cannot be used like a method.
代码如下:
if (OffenceBox.Text != "")
{
AddBook(int.Parse(AgeBox.Text), NameBox.Text, AddressBox.Text, (HeightBox.Text), OffenceBox.Text());
}
else
{
MessageBox.Show("Age must be max 3 numbers in length");
}
}
我该如何解决这个问题?
编辑:
修复了错误,现在遇到了另一个:
Argument 4: Cannot convert String to int 我似乎无法解决问题。
【问题讨论】:
标签: c#