I’m just getting started on my first project which is an educational web project. Here’s my shared property:
Static pShapes(9) As String = (“SWS”, “SWD”, “SWC”, “SBT”, “SBS”, “SBH”, “SBD”, “LWS”, “LWD”, “LWC”)
and here’s my shared method:
Dim R As New Random
Dim ValueD As Double
Dim ValueI As Integer
ValueI = UBound(pShapes,1)
ValueD = R.InRange(0, ValueI ) //Get random number
ValueI = ValueD //Automatically converts to Integer.
return pShapes(ValueI)
I’m getting errors on the UBound call (parameters are not compatible with this function) and the return statement (This is not an array but you are using it as one)
I don’t understand either error. Can someone help me out?