Here is sample code to check if all the items are same in a list
if(list.Any(x=> x ! = list[0]))
If you want to check any specific property use following code
if(list.Any(x=> x.Name ! = list[0].name))
Hope this help!
Learn, Share and Grow with me !
Here is sample code to check if all the items are same in a list
if(list.Any(x=> x ! = list[0]))
If you want to check any specific property use following code
if(list.Any(x=> x.Name ! = list[0].name))
Hope this help!