There are many ways to do this but I feel like I've missed a function or something.
Obviously List == List
will use Object.Equals()
and return false
.
If every element of the list is equal and present in the same location in the opposite list then I would consider them to be equal. I'm using value types, but a correctly implemented Data object should work in the same fashion (i.e I'm not looking for a shallow copied list, only that the value of each object within is the same).
I've tried searching and there are similar questions, but my question is an equality of every element, in an exact order.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…