I am having the hardest time coming up with a methodology to take a list of non-unique Selectlistitems and come out with a list of unique SelectListItems. I am attempting to use linq to do this... The code for what I tried was this
var queryResults =
from p in PatientList
group p by p.Value into g
select new SelectListItem { Text= g.Key, Value= g.Max(p => p.Value.Split('|')[1]) };
With this methodology I get the exact same list that I went in with. Now I am a complete novice when it comes to linq. I have done some linq to XML and linq to SQL, but Linq to Collections seems to be alluding...
Any Help possible?