Listview control used as a reference parameter - resulting "... does not contain a definition" error
public static void getitem(ref Form formname, ref ListView listname)
{
int x;
x=formname.listname.LastSelectedIndex;
}
When compiled, yields: System.Windows.Forms.Form does not contain a definition for 'listname'. Not sure if this is a syntax issue in how I'm using the listview reference, or what exactly the problem is?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Roei BarRank #1,271 · 1.4K reputationPosted Oct 7, 2009, 12:47 PM EDT
x=listname.LastSelectedIndex
Mike Pischke11 reputationPosted Oct 7, 2009, 11:16 AM EDT