I have two lists of Student Object in my code List<student> list1
and List<student> list2
.
The student object has the following properties.
FirstName
LastName
University
I have the following method where I would like to compare the value of the respective property between the objects in the two list using LINQ. I found a few examples in LINQ that showed how to compare two values in a list of integers or string, but could not find any examples that compares the property value of the objects in the List.
`private CompareList(ref List<student> L1,ref List<student> L2)
{
// compare FirstName of L1 to L2
......
}`
How would I go about doing this? Thanks!