i have a C# application in which i'd like to get from a List
of Project objects , another List which contains distinct objects.
i tried this
List<Project> model = notre_admin.Get_List_Project_By_Expert(u.Id_user);
if (model != null) model = model.Distinct().ToList();
The list model still contains 4 identical objects Project
.
What is the reason of this? How can i fix it?
It will Works ......
Check this example: you need to use either Comparator or override
Equals()