I would like to know if the method List<>.Sort actually changed the list or if its untouched.
I only came up with the following solution which doesn't feel like the most ideal there could be:
var fooList = new List<Foo>();
var tempList = fooList.ToList();
fooList.Sort(new FooComparer());
if (fooList.SequenceEqual(tempList))
{
//Sequence is same...
}
else
{
//Sequence is different...
}
Hope there is something faster than this, than already the Sort takes quite some time with the data at hand and now the additional tempList and going threw both collections in Enumerable.SequenceEqual, just gives me goose bumps.