I have a following collection, it has more than 500000 items in it.
List<Item> MyCollection = new List<Item>();
and type:
class Item
{
public string Name { get; set; }
public string Description { get; set; }
}
I want to return a list of items having distinct Name. i.e. to find out distinct item based on name.
What are the possible ways & which would be best in terms of time & memory. Although both are important however less time has more priority over memory.