R
RdS
hi,
#1 i am looking through some code and have a question. The class I am
looking at is a derived class that has one constructor (new). it is coded
as:
public sub new ()
..
..
..
end sub
i see that the base class has a new procedure with no arguments. The
arguments in both base and derived classes are the same. Is the new
procedure in the derived class shadowing or overriding the new procedure in
base class? I understand that it would be easy to tell if the coder
specified keyword of overrides or shadows, but they didn't.
#2 In another derived class I see two new procedures. One with no
parameters like one in base class and the other with two parameters. I
understand that the constructor is overloaded, but is the new with no
parameters shadowing or overriding the new in base class.
How can one know if shadowing is being used or if overriding is being used
when no keyword is specified in procedure declaration?
Thanks in advance.
#1 i am looking through some code and have a question. The class I am
looking at is a derived class that has one constructor (new). it is coded
as:
public sub new ()
..
..
..
end sub
i see that the base class has a new procedure with no arguments. The
arguments in both base and derived classes are the same. Is the new
procedure in the derived class shadowing or overriding the new procedure in
base class? I understand that it would be easy to tell if the coder
specified keyword of overrides or shadows, but they didn't.
#2 In another derived class I see two new procedures. One with no
parameters like one in base class and the other with two parameters. I
understand that the constructor is overloaded, but is the new with no
parameters shadowing or overriding the new in base class.
How can one know if shadowing is being used or if overriding is being used
when no keyword is specified in procedure declaration?
Thanks in advance.