Use 'new' keyword...

Peter Osucha <[email protected]> Thu, 2 Nov 2006 11:51:21 -0500
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <!&!AAAAAAAAAAAYAAAAAAAAAAh8puEHa/pGoCBtuLk0pZnCgAAAEAAAAHnt585rMXhHmqccP1M3a8kBAAAAAA==@energytechinc.com>
I have an object A that has a method called 'Copy' that returns a copy of
itself.

I have another object B that inherits from A (adding a few properties).  I
also added a method called 'Copy' to object B that returns a copy of itself.

On compilation of the project, I get the warning...

Warning 1 'ETI.B.Copy()' hides inherited member 'ETI.A.Copy()'. Use the new
keyword if hiding was intended.

How do I use the 'new' keyword as suggested by the error message to get rid
of this warning, please?

Sincerely,
Peter

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com