[Mono-list] Problem extending collection with generics

Chris Howie cdhowie at gmail.com
Wed Jan 9 09:31:27 EST 2008


On Jan 9, 2008 9:26 AM, Dan Smithers <dsmithers at talktalk.net> wrote:

> Thanks Robert, that seems to sort it out.
>
> Also, when do I need to use the override keyword? It seems a little
> redundant as it can only be used for methods that have been declared
> virtual in the base class.
>
> thanks
>

Virtual or override, correct.  You must specify this to tell the compiler
"yes, I meant to override this" the same way you use the new keyword in that
context to tell the compiler "yes, I meant to hide this."

You don't need to use override to implement an interface method since there
is no implementation that you are overriding.  (Though using this logic you
could make the case that you shouldn't need the override keyword when
overriding an inherited abstract method.)

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080109/e5b446fe/attachment.html 


More information about the Mono-list mailing list