What is nested Classes


What is nested Classes ?

✍: Guest

Nested classes are classes within classes. 
In sample below “ClsNested” class has a
“ChildNested” class nested inside it.
Public Class ClsNested
Public Class ChildNested
Public Sub ShowMessage()
MessageBox.Show(“Hi this is nested class”)
End Sub
End Class
End Class
This is the way we can instantiate 
the nested class and make the method call.
Dim pobjChildNested As New ClsNested.ChildNested()

2007-10-23, 5475👍, 0💬