Overridable functions

  • Thread starter Thread starter grawsha2000
  • Start date Start date
G

grawsha2000

Hello,


I have an overridable function in a base class (to do some basic
database works) that gets inherited by many concrete classes. These
concrete classes expands the work of that overridable function, my
question is is why VB.net includes "Return" keyword in the concrete
classes when the overridable function is called, i.e., I end up with
two Return keywords, one for the overridable function and the other
for the conrete class's function?




MTIA,
Grawsha
 
Hello,

I have an overridable function in a base class (to do some basic
database works) that gets inherited by many concrete classes. These
concrete classes expands the work of that overridable function, my
question is is why VB.net includes "Return" keyword in the concrete
classes when the overridable function is called, i.e., I end up with
two Return keywords, one for the overridable function and the other
for the conrete class's function?

MTIA,
Grawsha


Just figured it out!!
Since the overridable function in the base class does basic work and
actually returnes no values, then leaving the more complicated work
that result in a returned value to the concrete function, I just
remove the first Return keyword that precedes the Mybase.function
statements.
 
I think the Return MyBase.Func () is put there by auto-complete for
convenience.


Robin
 
Back
Top