Sanjeev Kumar

Sanjeev Kumar

  • NA
  • 309
  • 200.6k

how to access functions of different namespaces in a module?

Mar 9 2011 12:58 AM
I am trying the following code and unable to get the desired output. Can anybody help me?
Imports System
Namespace MyNamespace
Public Class Class1

Public Shared Function disp()

Console.Write("hello" & vbCrLf)
'Console.Write("this is an example of namespace in vb.net")
Console.Read()
End Function
End Class
End Namespace

Namespace MyNamespace1
Public Class Class2
Public Shared Function dis()
Console.Write("this is an example of namespace in vb.net")
Console.Read()
End Function
End Class
End Namespace


Module module1
Sub main()
MyNamespace.Class1.disp()
MyNamespace1.Class2.dis()
End Sub
End Module


Answers (1)