> If the method is virtual on the base then it must be an
> override otherwise its a shadow.
class Base
{
public virtual void M() { }
}
class Derived
{
public new virtual void M() { }
}
In this case, Base.M() is virtual (and not final), but Derived.M() is
not an override. You can see this in the metadata because Derived.M()
has the NewSlot flag set. Methods with NewSlot are never implicit
overrides of base methods.
Cheers,
Fabian
> On Tue, Oct 26, 2010 at 3:58 PM, Greg Young <[email protected]> wrote:
>>
>> Ah yes ... That should do it thanks JB.
>>
>> On Tue, Oct 26, 2010 at 3:46 PM, Jb Evain <[email protected]> wrote:
>>>
>>> On Tue, Oct 26, 2010 at 9:42 PM, Greg Young <[email protected]>
>>> wrote:
>>> > but I guess I could just look if A::Foo is virtual. Not sure if that is
>>> > good
>>> > enough, will have to check ECMA docs.
>>>
>>> You indeed have to check whether they're virtual. You also have to
>>> differentiate NewSlot/ReuseSlot methods for shadowing or overriding.
>>>
>>> --
>>> --
>>> mono-cecil
>>
>>
>> --
>> Les erreurs de grammaire et de syntaxe ont été incluses pour m'assurer de
>> votre attention
>
>
>
> --
> Les erreurs de grammaire et de syntaxe ont été incluses pour m'assurer de
> votre attention
>
> --
> --
> mono-cecil
--
--
mono-cecil