No, Cecil does not provide such a method, because Cecil gives us only the CIL metadata as it is. (There is a Cecil.Rocks project that contains some useful extension methods, but not this one)
MSIL methods have an "override" attribute that contains references to methods that this method overrides (in Cecil, there is indeed an Overrides property in the MethodDefinition class). However, this attribute is used only in some special cases, such as the implementation of an explicit interface. Usually this attribute remains empty and which methods are overridden by the method in question is based on conventions. These conventions are described in the ECMA CIL standard. In short, a method overrides methods that have the same name and the same signature.
The following code snippets can help you with this discussion: http://groups.google.com/group/mono-cecil/browse_thread/thread/b3c04f25c2b5bb4f/c9577543ae8bc40a
public static bool Overrides(this MethodDefinition method, MethodReference overridden) { Contract.Requires(method != null); Contract.Requires(overridden != null); bool explicitIfaceImplementation = method.Overrides.Any(overrides => overrides.IsEqual(overridden)); if (explicitIfaceImplementation) { return true; } if (IsImplicitInterfaceImplementation(method, overridden)) { return true; }
Steves
source share