} expected
are simply that you missed a }, for example:public class X
{
string Y;
void MyMethod()
{
int i = 1;
void MyMethod2()
{
int j = 1;
}
in sight. C# files need the same number of { as they do }. If you choose "Format Document" on the edit>>advanced menu and look at the indentation, you'll see where you went wrong. The code sample I made above, when reindented to add 4 more spaces upon every { will look like:public class X
{
string Y;
void MyMethod()
{
int i = 1;
void MyMethod2()
{
int j = 1;
public class X
{
string Y;
void MyMethod()
{
int i = 1;
}
void MyMethod2()
{
int j = 1;
}
}
listbox doesn't contain a defintion for Add
is also as it says; you;ve got code like this maybe:listbox1.Add("blah");
listboxWhatever.Items.Add
to add an item to the Items collection of the listbox