© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
10 replies
항암제

Derived class , BaseClass, Dictionary

Hello! I have a question. I declared Dictionary<int, BaseClass>, initialized the variables and functions of the BaseClass in a class that inherits from it. When I called a method from the dictionary, I confirmed that the overridden method was invoked. Can you explain how this works and why it's possible? I tried searching but couldn't find much. I'll attach a picture.
Test001.png
Test002.png
Test003.png
ConsolePic.png
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

✅ JSON Deserialize Derived Class
C#CC# / help
2y ago
Mocking derived class with abstract base class
C#CC# / help
4y ago
❔ Winforms Property from BaseClass Form not getting transferred to derived Form
C#CC# / help
4y ago
❔ Bind derived class and base class to CollectionView and Picker
C#CC# / help
3y ago