Answer: NotInheritable keyword is an equivalent of
Sealed Class .
For Ex:-
Public NotInheritable Class Credit
Private Sub New()
'Constructor Initialization
End Sub
End Class
For Example:-
NotInheritable Class S1
'do your code
End Class
Class S2
Inherits S1
When derive a class from S1 then will get below error:-
S2 cannot onherit from class 'S1' because 'S1' is declared 'NotInheritable'
Asked In: Many Interviews |
Alert Moderator