I have a ListView on Form1 that I update on different times. My problem is that when I am in function Test() I need to call the function UpdateListView. The only way I can this is to make UpdateListView static, but then I get the error "An object reference is required for the nonstatic field method". How do I solve this problem
Class Form1
{
X x = new X();
TestListView()
{
x.Test()
}
UpdateListView()
{
listView1.Items.Add
}
}
Class X()
{
Test()
{
How do I call UpdateListView
}
}
Class Form1
{
X x = new X();
TestListView()
{
x.Test()
}
UpdateListView()
{
listView1.Items.Add
}
}
Class X()
{
Test()
{
How do I call UpdateListView
}
}