HOW CAN YOU PREVENT A CLASS FROM OVERRIDING IN C# AND VISUAL BASIC?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C# 
C#
 1256  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    How can you prevent a class from overriding in C# and Visual Basic?

    You can prevent a class from overriding in C# by using the sealed keyword; whereas, the NotInheritable keyword is used to prevent a class from overriding in Visual Basic.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!