Hi,
Until now I was using this code to determine whether a method is an
implicit interface implementation:
public static bool IsInterfaceImpl(this MethodDefinition methodDef)
{
return methodDef.IsVirtual && methodDef.IsNewSlot && methodDef.IsFinal;
}
But now I found out that it isn't true. Consider the following C# code:
class BaseClass : IComparable<BaseClass>
{
public virtual int CompareTo(BaseClass other) { return 0; }
}
class SubClass : BaseClass
{
public override int CompareTo(BaseClass other) { return 1; }
}
In this case, BaseClass.CompareTo is virtual, newslot, but not final.
What other options do I have to safely determine whether
BaseClass.CompareTo (and possibly also SubClass.CompareTo) is implementing
an interface method, and which?
--
--
--
mono-cecil
---
You received this message because you are subscribed to the Google Groups
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.