views:

17

answers:

0

I create my listview in my design part, not programmatically.

Then I want to reach this listview's content when I pressed some button.

In my main form, I created a public listview to return listview2 as in my design.

public ListView lst
    {
        get { return listView2; }
        set { listView2 = value; }
    }

Then in my other form, I created an object of main form, and tried to reach listview2 which is in main form.

Mainform main = new Mainform();

for(int i=0;i<main.lst.Items.Count;i++)

But I see that items.count is 0. I want to send my listview content to other form when I pressed button5 for example.

Any idea ?