Hi Jb, >> void Foo <S, T> ( int i, S s, T t ); >> >> to something like: >> >> System.Void Foo`2 ( System.Int32, !!0, !!1 ) > > You can use the fullname of the definition of a method.
Using the full name for either override resolution or uniquely identifying signatures has a few problems, due to the fact that it encodes generic parameters by name instead of by position and because it doesn't include the generic parameter count: - It cannot discriminate between Foo<S> () and Foo<S, T>(). - If (in the example above) there is also a type with full name "T" (or a type parameter of the declaring type naned "T"), a reference to it cannot be distinguished from a reference to the generic argument. - It cannot be used for reliable override detection in scenarios such as the one identified by Chistian Schuster in his other post. Apart from issue #1, these are edge cases, of course, but I'd still not really feel good doing signature matching based on the full name as it's implemented right now. As to override resolution: Of course, it can be done manually, as shown by the linker. A unique, robust signature string format would have advantages, though; e.g., easy hashability (for performance). However, that's probably not what the member full name was intended for, right? So, manually implementing it would probably be the way to go. Though manual implementation is much more cumbersome without being able to put polymorphic methods on the respective TypeReference subclasses :) Cheers, Fabian -- -- mono-cecil
