Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot assign to 'Add' because it is a 'method group'

Status
Not open for further replies.
Nov 17, 2008
1
US
Error 1 Cannot assign to 'Add' because it is a 'method group'

Here is my code;
private void btnAdd_Click(object sender, EventArgs e)
{

lstResults.Items.Clear();
lstResults.Items.Add = ("Food\t \t Like\t Dislike ");
int intIndex = Convert.ToInt32(cboFoods);
}
I dont get it. It is supposed to add the header to the lstbox
 
remove the = sign

Code:
lstResults.Items.Add ("Food\t \t Like\t Dislike ");

Patrick

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top