0

[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:

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by sushaqua
0
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'.....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.