In VB6, for a program I made, I used the following code:
Dim varNames() As Variant
Dim intIndex As Integer
Dim strName As String
varNames() = Array("Beast", "Minotaur", "Skeleton")
Call Randomize
Let intIndex = Int(Rnd() * (UBound(varNames) + 1))
Let strName = varNames(intIndex)
Let Label1.Caption = strName
===
What this did was randomly get a name from the array (Beast, Minotaur, or Skeleton) and display it in a label.
I'd like to use this code again in NET 2005, so I was wondering how do I rewrite this code to make it work in NET?
Enter your message below
Sign in or Join us (it's free).