vb.net - shadows an overridable method in the base class -
i'm on new project , there's lot of warning:
function 'yyy' shadows overridable method in base class 'zzz'. override base method, method must declared 'overrides'.
i'm wondering if it's safe put overrides. default behavior? there lot of testing done , want minimize problems.
changing overrides not same. can add keyword shadows
eliminate warning, if have run long time message, changing them override may cause things work differently before.
the difference between overrides , shadows shadows not have polymorphic effect overrides does, if call method on base class object, if happens holding child class instance, base class method called.
but again, if getting warning, means adding shadows
keyword you, throws warning make sure effect want, can eliminate adding keyword yourself. if suspect overrides
behavior wanted, can add well, realize not equivalent.
Comments
Post a Comment