class Program
{
static delegate R Foo<I, R>(I i);
static void Main(string[] args)
{
Foo<int, string> foo = (int x) => x.ToString();
// Why can't the compiler IMPLICITLY infer the following declaration?
//Foo foo = (int x) => x.ToString();
}
}
EDIT 1: Der obige Code ist eigentlich nicht kompilierbar. Der Delegat ich definiert hat statische Modifikator, die nicht anwendbar ist!