Question : Linq Distinct

I am having some trouble with Linq on a Distinct.  I have a list of custom objects as defined below, and I need to get a list of the distinct entries values.  How do I get it to work?  I think I just need how to implement the Distinct(comparer).

        internal class FirstXTimeDoc : IEqualityComparermeDoc>
        {
            public string Article;
            public DateTime ArticleDate;

            #region IEqualityComparermeDoc> Members

            bool IEqualityComparermeDoc>.Equals(FirstXTimeDoc x, FirstXTimeDoc y)
            {
                return (x.Article == y.Article && x.ArticleDate == y.ArticleDate);
            }

            int IEqualityComparermeDoc>.GetHashCode(FirstXTimeDoc obj)
            {
                throw new NotImplementedException();
            }

Answer : Linq Distinct

this should work
1:
IEnumerable distinctNames = yourListOfObjects.Select(x => x.Name).Distinct();
Random Solutions  
 
programming4us programming4us