'Namespace' statement must end with a matching 'End Namespace'.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Prathap
    New Member
    • Nov 2011
    • 37

    'Namespace' statement must end with a matching 'End Namespace'.

    I am getting this error,here is my code.thanks
    Code:
    Public Class Sample2
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim counter As Integer
            counter = 1
            While (counter <= 10)
                MessageBox.Show("Counter Now is : counter")
                counter = counter + 1
            End While
        End Sub
    End Class
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    use WEND instead of End While

    Comment

    • Prathap
      New Member
      • Nov 2011
      • 37

      #3
      Thanks for your response, but an error showing WEND is not supported

      Comment

      • kadghar
        Recognized Expert Top Contributor
        • Apr 2007
        • 1302

        #4
        I really don't see the error then, perhaps you're opening a namespace before this code, but never closing it.

        Comment

        • Prathap
          New Member
          • Nov 2011
          • 37

          #5
          thanks, the error is "WEND statements are no longer supported;use End while statements instead"


          Code:
          Public Class Sample2
              Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
                  Dim counter As Integer
                  counter = 1
                  While (counter <= 10)
                      MessageBox.Show("Counter Now is : counter")
                      counter = counter + 1
                  wEnd While
              End Sub
          End Class

          Comment

          Working...