VB Nesting of Namespaces

We can also nest one namespace into another namespace, rest all steps are same and write the following code to create nested namespace:-

Namespace op
    Namespace dc
        Public Class x
            Public Sub hj()
            End Sub   
         End Class
        Public Class y
            Public Sub jke()
            End Sub
        End Class
    End Namespace
End Namespace

Now in order to import the namespace defined in the previous slide write following code:

Imports WindowsApplication1.op.dc

Now all the classes defined inside jk will get accessible in the current project.

Share this article on