C# in Depth

Cover of C# in Depth
Order now (3rd edition)

Activator.CreateInstance<T>()

Chapter 3: Parameterized typing with generics: 3.3.2

Created: 5/7/2008
Last updated: 5/7/2008

Joe Albahari pointed out that a good example of a method where you always have to specify the type parameter is Activator.CreateInstance<T>(). With no "normal" parameters, there's nothing for the type inference rules to work with. This is interesting on two counts: