protected + virtual

  • Thread starter Thread starter Eric Cadwell
  • Start date Start date
E

Eric Cadwell

If I mark something protected virtual I really get protected OR virtual. I
see that the C# spec allows protected AND virtual but the compiler does not.

How would I make such a change to the IL?

Thanks,
-Eric
 
Eric,
If I mark something protected virtual I really get protected OR virtual. I
see that the C# spec allows protected AND virtual but the compiler does not.

How would I make such a change to the IL?

Don't you mean protected and *internal*? There's no problem combining
protected and virtual.

If you want protected and internal (as opposed to protected or
internal, which is what the protected internal combination gives you),
you can use ILDASM and ILASM and change the IL access modifier from
famorassem to famandassem.



Mattias
 
Back
Top