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