I have an object with the following Properties
public class Name
{
public string FirstName
{
get;
set;
}
public string LastName
{
get;
set;
}
}
I get a list of Name Object as NameList which contains two objects as item
I want to compare these two objects in the list to get the object which has same FirstName. I have been looking for a solution for past 2 hours.
In the List of Name object I get two Name objects as
ListItem 1: FirstName : Steve ; LastName : Rogers;
ListItem 2 : FirstName : Steve ; LastName : David;
What i want is to compare these to list Items check if the FirstName Properties are same
Nameobjects. He want to get allNameobjects which has the same FirstName as another Listitem