By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Overridable functions

P: n/a
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

May 17 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Can you post some code? I don't quite understand the problem.....
May 17 '07 #2

P: n/a
On May 17, 7:21 pm, grawsha2...@yahoo.com wrote:
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.

May 17 '07 #3

P: n/a
I think the Return MyBase.Func () is put there by auto-complete for
convenience.
Robin
May 17 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.