On Jan 2, 2011, at 9:46 AM, reichertj wrote:
> I noticed that Cecil does not differentiate between
> generic and non-generic methods. Example:
>
> System.Void Foo:Bar()
> System.Void Foo:Bar<T>()
>
> both have the FullName 'System.Void Foo:Bar()'.
>
> Shouldn't be the number of generic parameters be included in the full
> name, like 'System.Void Foo:Bar``1()'?
The same is true for Reflection:
csharp> typeof(Activator).GetMethods()
.Where(m => m.Name == "CreateInstance" && m.IsGenericMethod);
{ T CreateInstance[T]() }
Cecil is no different here (as Cecil shows what's in IL, and the IL method
names aren't "name mangled" either).
Thus, this is By Design.
- Jon
--
--
mono-cecil