E
x
c
e
l
P
T
P

How do you prevent a class from being inherited?

February 6, 2014

In VB.NET you use the NotInheritable modifier to prevent programmers from using the class as a base class. In C#, use the sealed keyword.

.NET supports only single inheritance. However the purpose is accomplished using multiple interfaces.