List<bool> test = new List<bool>(); test.Sort(new Func<bool, bool, int>((b1, b2) => 1));
What am I missing?
Error 2 Argument 1: Cannot convert from "System.Func" to "System.Collections.Generic.IComparer"
Error 1 The best overloaded method match for "System.Collections.Generic.List.Sort (System.Collections.Generic.IComparer)" has some invalid arguments
When i have
private int func(bool b1, bool b2) { return 1; } private void something() { List<bool> test = new List<bool>(); test.Sort(func); }
It works great. Isn't that the same thing?
source share