Re: Declaring Variables

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Mark A. Sam <msam@xxxxxxxxxxxxxxxxx> wrote:
I am using Visual Web Developer 2005 Express. I want to declare a varible,
using Visual Basic as the language and can't get anywhere. For example

Public Test1 as String

I'll get en error saying to change Public to Dim. When I do, it will say
that Test1 is an unused local variable.

It sounds like you're putting that line of code inside a method, making
it a local variable. "Public" only makes sense for an instance or
shared variable.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.