According to Pro LINQ: Language Integrated Query in C# 2008, Prototype of OrderBy operator is
public static IOrderedEnumerable<T> OrderBy<T, K>(
this IEnumerable<T> source,
Func<T, K> keySelector)
where
K : IComparable<K>
But the MSDN documentation does not have a generics contraint on TKey that it should be of type IComp...
Hi,
I started reading Holub's pattern book and not sure if this is a mistake (pg 59-61).
He has in listing 2-3
public interface Employee
{ void youAreFired();
}
public static class EmployeeFactory
{ private Factory() {}
public static Employee create()
{ return new Peon();
}
}
/* package*/ class Peon implements Employee
{ p...
I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it.
There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors.
For example, JLS 18.1 The Grammar of the Java Programming Language is supposed to be the authoritative ref...