Hi all
i want to have some string constant
i put these in a module
public const name(1) ="hi"
public const name(2) = "hi2"
it says i can not have array , so, what can i do?
Printable View
Hi all
i want to have some string constant
i put these in a module
public const name(1) ="hi"
public const name(2) = "hi2"
it says i can not have array , so, what can i do?
You can use different names for each constant like this:
Code:Public Const HELLO As String = "Hello"
Public Const HELLO_2 As String = "Hello Again"
But i need to be array..... so, any help please
No way, some options though:
1. Enumeration
2. A normal array acts like a constant of arrays, just remember to initialize itCode:Enum myenum
const1 = 1
const2 = 2
End Enum
Code:Public Arrayname(2) as variabletype
.
.
Arrayname(0)="HELLO"
Arrayname(1)="HELLO_2"
Since it will work like constant , thinking where is the best place to initialize them... in MDI form load?
Best place would be the Load event of the form (or MDI form) that loads first, or Sub Main of a module if the project loads from there. :rolleyes: