|
-
Apr 15th, 2005, 11:26 AM
#1
Thread Starter
Member
Pass a value of integer type to access array...
May I know what is the reason that I'm not able to access the character in the array? Is there a way to solve this problem or I've made a small mistake?
' Generate Random Caps Characters
Private Function randomCaps() As Char
Dim charCapsArr() As Char = "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
Dim randNum As Integer
Dim rn As Random
randNum = rn.Next(0, 25)
randomCaps = charCapsArr(randNum)
Return randomCaps
End Function
______________________________________
Warmest Regards,
Lex
______________________________________
:|: Don't Mess With The Predator :|:
-
Apr 15th, 2005, 11:11 PM
#2
Re: Pass a value of integer type to access array...
Have you stepped through the code and checked out the value randNum was acquiring?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|