title: How to compare column values of list
body: <p>I have a list of rows having many columns. Say, a song is a row, and album,artist,title,year are it's columns. These are displayed in a list view. When i multi-select, say 5 songs, i need to check if the artist is the same for all 5 songs or not. The same for album,title,year.</p>
  
  <p>my pseudo-code is as follows:</p>
  
  <pre><code>ListView.SelectedListViewItemCollection selectedItem = this.lvuFiles.SelectedItems;
  
  foreach (ListViewItem itemSelected in selectedItem)
  {
    // pass a list of 'title's to a method to check for equality
  }
  </code></pre>
  
  <p>i have implemented the method which checks for equality. I just could not figure out how to store the lists (title list,album list, etc) and pass them.</p>
  
  <p>EDIT:</p>
  
  <p><a href="http://i.min.us/iexmSg.png" rel="nofollow noreferrer">Screenshot of List View http://i.min.us/iexmSg.png</a></p>
  
  <p>now, i need to check the 3 Titles are matching or not. One way i thought was to add all the titles to a list and pass to the method. Do the same for artist,album. I could not get the selectedItems' value. SO, i have to maintain multiple lists for multiple properties. Is there any better way. As for the suggestions given, i tried the linq one. Says, method not defined.</p>