In this program i have created a class and developed it in such a way that other classes can not inherit from it. This can be done using "Sealed" keyword in C# but, i have not used "Sealed" keyword. We get a compile time error when we try to inherit a class from a "Sealed" class. But in my program we get a run-time error. This program is developed in such a way that no compile time error will be thrown but a run-time error will be thrown at the time of assigning child class object to parent class reference.
-
Notifications
You must be signed in to change notification settings - Fork 0
WaleedNaveed/Stop-inheritance-of-class-without-using-Sealed-KeyWord
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Make a class non-inheritable without using Sealed keyword
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published