Sorry I didnt see they werent virtual. Yes with this you just look at what
the static call binding is to.

On Thu, Apr 26, 2012 at 11:29 AM, Jonathan Pryor <[email protected]> wrote:

> On Apr 25, 2012, at 1:29 AM, [email protected] wrote:
> > doesn't it mark newslot on the vtable? Isnewslot should be set to true
> unless I'm misunderstanding some nuance of the question.
>
> No. `newslot` is for C# `virtual` methods, whereas `new` is used to remove
> a C# warning about hiding inherited members and need not involve virtual at
> all:
>
>        class Base {
>                public int Foo {get; set;}
>        }
>
>        class Derived : Base {
>                public new string Foo {get; set;}
>        }
>
> Derived.Foo is:
>
>   .method public hidebysig specialname
>          instance default string get_Foo ()  cil managed
>   .method public hidebysig specialname
>          instance default void set_Foo (string 'value')  cil managed
>   .property instance string Foo ()
>   {
>       .set instance default void Derived::set_Foo (string 'value')
>       .get instance default string Derived::get_Foo ()
>   }
>
> Note no newslot, no override, etc. Also note that Base.Foo has the exact
> same modifiers ("public hidebysig specialname instance default ... cil
> managed").
>
> - Jon
>
> --
> --
> mono-cecil




-- 
Le doute n'est pas une condition agréable, mais la certitude est absurde.

-- 
--
mono-cecil

Reply via email to