The documentation comes from the Markdown files in the source code, so is always up-to-date but available only in English. Enjoy!
In many .Net and SF API a IComparer or IEqualityComparer is taken as a parameter of the constructor of a data structure or a method.
Implementing a IComparer is too ceremonial, lambda comparer makes it simpler.
public class LambdaComparer<T, S> : IComparer<T>, IEqualityComparer<T>, IComparer, IEqualityComparer
{
public LambdaComparer(Func<T, S> func){..}
(...)
}Example:
List<Person> people = (...);
people.Sort(new LambdaComparer<Person, string>(p=>p.Name)); We are a company specialized in developing custom applications and providing solid tools for developers.
© Signum Software. All Rights Reserved.
Powered by Signum Framework