[Imports System]
[Imports arun.VB.Namespaces]


[ Class Hello]
[Shared Sub Main()]
[Dim m As New Hello]
[System.Console.WriteLine(m.GetMessage())]
[End Sub] 'Main
[End Class] 'Hello


[Namespace arun.VB.Namespaces]
[Public Class Hello]
[Public Function GetMessage() As String]
[Return "Hello, world"]
[End Function] 'GetMessage
[End Class] 'Hello
[End Namespace] 'arun.VB.Namespaces

hi all..
i am new to this site and vb.net too.. this was code in on of the site.. 'm not able to use it...
where to place "Namespace arun.VB.Namespace" segment and how to import it??plz... help me....:confused:

Imports System 
Imports arun.VB.Namespaces 
Namespace arun 
    Namespace VB 
        Namespace Namespaces
            Public Class Hello 
                Public Function GetMessage() As String
                    Return "Hello, world" 
                End Function 'GetMessage
            End Class 'Hello
        End Namespace 'arun.VB.Namespaces 
    End Namespace
End Namespace 

Class Hello 
    Shared Sub Main() 
        Dim m As New Hello
        System.Console.WriteLine(m.GetMessage())

    End Sub 'Main 

End Class 'Hello

i edited this way and compiled it says 'Get Message' is not a member of 'hello'.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.