List<AccessRights> set = new List<AccessRights>();
set.Sort(delegate(AccessRights x, AccessRights y) { });
ReSharper, instead of telling me that I a return statement is missing in the anonymous delegate, tells me there is a conflicting usage of method Sort(IComparer<...>) and Sort(Comparion<...>). ReSharper must be smarter in this situation and detect that what I need is adding return statement. The following code is correct:
List<AccessRights> set = new List<AccessRights>();
set.Sort(delegate(AccessRights x, AccessRights y) { return x-y; });
Description
I have the following code:
List<AccessRights> set = new List<AccessRights>();
set.Sort(delegate(AccessRights x, AccessRights y) { });
ReSharper, instead of telling me that I a return statement is missing in the anonymous delegate, tells me there is a conflicting usage of method Sort(IComparer<...>) and Sort(Comparion<...>). ReSharper must be smarter in this situation and detect that what I need is adding return statement. The following code is correct:
List<AccessRights> set = new List<AccessRights>();
set.Sort(delegate(AccessRights x, AccessRights y) { return x-y; });