© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
89 replies
Decoherence

overriding methods

I have multiple questions:

1) What is the benefit of declaring a base method as
virtual
virtual
before overriding it in an inheriting class? This is my understanding: it allows calling the override despite casting to the base class. Is this correct?

2) What is the difference between overriding a method, and hiding a method? As in, what does the
new
new
keyword do exactly?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ methods
C#CC# / help
8mo ago
✅ Methods
C#CC# / help
16mo ago
✅ Methods
C#CC# / help
3y ago
Next page