This all works as expected but I noticed that the Execute method is marked internal. My understanding of the internal keyword is that all classes or members marked internal are only available to the containing assembly.
How is it that Execute is available to my code?
[Took a quick check at my code and reflector to double check my post and found something new]
I don't actually have access to call the execute method in my derived class. This seems very interesting. So since the method is marked protected virtual, I'm allowed to override it ignoring the internal scope, but can't actually call it. Does this seem odd
to anyone else? So how would I create a method that is overridable only to classes in my assembly, drop the protected modifier?
'Internal protected' means can be accessed from current assembly or by any other class that extends this one.... think of the mnodiffiers like having and 'or' between them 'internal or protected' access
Beautiful! I was going to say, but I can't get to the Execute method in my assembly but then I realized it's not public, it's protected, and indeed I can access execute from within the derived class.
Thanks for the response.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.