Reputation: 268
Why
var funcDelegatesCount = Assembly.Load("mscorlib")
.GetTypes()
.Count(t =>
t.Name.StartsWith("Func`")
&& t.BaseType == typeof(MulticastDelegate));
returns 9. But in fact there are 17.
Upvotes: 2
Views: 97
Reputation: 34295
Huh. The answer is funny.
Func<>
to Func<,,,,,,,,>
are in mscorlib
assembly.
Func<,,,,,,,,>
to Func<,,,,,,,,,,,,,,,,>
are in System.Core
assembly.
Check:
Console.WriteLine("{0} != {1}",
typeof(Func<,,,,,,,,>).Assembly, typeof(Func<,,,,,,,,,>).Assembly);
Upvotes: 4