Which keyword is used in C# to avoid inheritance? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 4

Which keyword is used in C# to avoid inheritance?

27th Apr 2019, 10:23 AM
Dhruvin Patel
Dhruvin Patel - avatar
3 Réponses
+ 7
In order to prevent a class in C# from being inherited, the keyword sealed isused.
27th Apr 2019, 10:31 AM
Alessio Benvenuti
Alessio Benvenuti - avatar
+ 2
Similar to 'final' in Java when applied to classes. Cmiiw.
28th Apr 2019, 1:20 AM
Sonic
Sonic - avatar
+ 1
'Sealed' class is used to avoid inheritance.
28th Apr 2019, 5:52 AM
Gayan Charith Elgiriya
Gayan Charith Elgiriya - avatar