I've a static class named "MyTestClass", and it contains several static methods and variables. And there's a static method in this class named "AddItemToListView" which is responsible for adding new item in a ListView control which is located in a from named "Form1".
How can I use the method named "AddItemToListView" to access the form control to add this row?
My question is about accessing from control from a static method, not about how to add item in a list view.
My method is:
public static void AddToListView(string Serial, string URL, string returnValue)
{
string[] array = { Serial, URL, returnValue };
ListViewItem listViewItem = new ListViewItem(array);
ListViewControl.Items.Add(listViewItem);
}