Results 1 to 9 of 9

Thread: Variable/String assignment

Threaded View

  1. #5
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Variable/String assignment

    In a procedure you can only use Dim or Static to declare a variable. If you're wanting to 'save' it's value then you would have to declare it at the class level.

    vb.net Code:
    1. Public Class Form1
    2. 'Declare here
    3. Public s As String
    4.  
    5.    Public Sub SomeMethod()
    6.  
    7.     End Sub
    8.  
    9.  
    10. End Class

    Edit: here's a link to Access Modifiers since they tie together.
    Last edited by ForumAccount; Jul 19th, 2009 at 11:20 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width