Nieodwołalny element nie może być użyty jako metoda?
W moim programie pojawiają się następujące błędy:
'System.Windows.Forms.TextBox.Text' is a 'property' but used like a 'method'
i
Non-invocable member 'System.Windows.Forms.Control.Text' cannot be used like a method.
Oto kod:
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");
}
}
Jak mogę rozwiązać ten problem?
EDYTUJ: Naprawiono błąd, a teraz napotkał inny:Argument 4: Cannot convert String to int
i nie mogę rozwiązać problemu.