Current implementation not overrideable

Topics: Argotic.Core
Sep 24, 2008 at 2:47 PM
Hi all,
I'm happily chugging-away familiarising myself with Argotic, but have come across this problem.

[note, I'm a Java/Javascript programmer by trade, having been away from Win development for 9 years]

I wish to extend the AtomEntry class, since it's very close to what I need (I just want to add some convenience getter/setters).  It appears that with .Net 2.0 I can only override a function when it is marked as 'overrideable'.

None of the functions in AtomEntry are marked in this way.  This appears to mean I can't override them.

1.  Is my understanding of .Net mistaken?
2.  Is there a design principle why the functions can not be overridden?

Sep 24, 2008 at 5:37 PM
My limited understanding is that if a method is virtual, sub-classes are expected to be able to override a method. You can however hide the base implementation of a method by specifying the same method signature on the sub-class using the new keyword.
Sep 25, 2008 at 9:07 AM
Aah, after some persistence I've found that it is possible to override parent class members - regardless of the presence of 'overrideable'. 

I was receiving a compiler warning indicating that my inherited function was changing the method signature of the base class.  This was just a warning, not an error.  I was able to make the warning 'go away' by explicitly indicating my intention that this should happen - by adding the 'shadows' keyword.

Hopefully this guidance will help the next .Net newbie...