2
Answers

listview control used as a reference parameter - resulting "... does not contain a definition" error

Ask a question
Mike Pischke

Mike Pischke

14y
2.5k
1
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?

Answers (2)