You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking into LinqGen to see if it would be able to replace most of my vanilla LINQ usage, and stumbled upon this. Vanilla LINQ's Max and MaxBy methods will return the type of the container. LinqGen's returns int instead. (Min and MinBy are also affected.)
Example:
varlist=newList<double>{1.0,2.0,4.0};// Vanilla LINQ:doublemaxVanilla= list.Max();doublemaxNegVanilla= list.MaxBy(x =>-x);// LinqGen:doublemaxGen= list.Gen().Max();// This won't compile, as Max return intdoublemaxNegGen= list.Gen().MaxBy(x =>-x);// This won't compile, as MaxBy returns int
The text was updated successfully, but these errors were encountered:
I was looking into LinqGen to see if it would be able to replace most of my vanilla LINQ usage, and stumbled upon this. Vanilla LINQ's
Max
andMaxBy
methods will return the type of the container. LinqGen's returnsint
instead. (Min
andMinBy
are also affected.)Example:
The text was updated successfully, but these errors were encountered: