Having some trouble with these methods on C# 2010 express with a new winform project both data types have the method count, which seems to be documented on MSDN, however I can not seem to get them to work. The listview control itself seems fine when compiling.
listView2.SelectedItems.Count();
Error 1 'System.Windows.Forms.ListView.SelectedListViewItemCollection' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'System.Windows.Forms.ListView.SelectedListViewItemCollection' could be found (are you missing a using directive or an assembly reference?)
listView2.SelectedIndices.Count();
Error 1 'System.Windows.Forms.ListView.SelectedIndexCollection' does not contain a definition for 'Count' and no extension method 'Count' accepting a first argument of type 'System.Windows.Forms.ListView.SelectedIndexCollection' could be found (are you missing a using directive or an assembly reference?)
Both data types seem to be defined. Also cannot use indices.
listView2.SelectedItems[0]