-
Dim numbers ?
Hello vbforums. I've been making string cipher/encoders for quite some time but i've never had to dim a number. Does anyone know how i can do that ?
What im trying to do:
What error im getting:
Code:
"Identifier expected."
// Andreas Digmann
-
Re: Dim numbers ?
In Visual Basic.Net, in order to declare a variable it must start with either an underscore or a letter followed by letters, numbers, and underscores(or nothing else if it starts with a letter).
Something else, if you're declaring a number then you should set the data type as a numeric data type such as an Integer, Double, Decimal, Short, etc. rather than a String because a String basically represents Text. So change your code to something like this:
Code:
Dim _1 as Integer = 1
'Or
Dim one As Integer = 1
Edit - Here is a list of data types offered in VB.Net: https://msdn.microsoft.com/en-us/library/47zceaw7.aspx
-
Re: Dim numbers ?
Thanks 'dday9' - Hope it will work, hahaha i tried to whipe the bug off my screen. :D