Generic Method Support
Sunday, January 22, 2006
From now on, .NET Console supports calls to generic methods. It was not all that hard to do, because:
- The parser did already recognize generic type arguments in method call expressions, even nested ones.
- Finding runtime types for such type arguments was already implemented in the Gregor.Core.Reflect.FindType() methods.
- Constructing (ie., binding) generic methods is as simple as calling MethodInfo.MakeGenericMethod(). The so constructed methods are then further processed in regular overload resolution.
Notice that .NET Console cannot infer generic type arguments from the types of arguments supplied in the call.