I have a list of the object where Parent ID
is there for that item.
How to check for the list of items whether the same parent is available more than once in the list.
For example.
Public Class Cars
{
private int CarId {get; set;}
private int CarParentId { get; set;}
Private int CarName { get; set;}
}
List<Cars> Cars = new List<Cars>()
Cars.Add(Some Values)
How to check whether the Same parent is available more than once in the list.