Franglais
Member
Type expected [RESOLVED]
I am trying to use the random class in a program but receive the following:
Dim randomObject As Random = New Random
The Random is underlined and a message saying "type expected". I have Imports.System and have tried Imports.Random but have not been able to resolve the problem. Funny though, when doing the same thing in a Console application I do not encounter the same error, it works.
Any ideas anybody, I have spent ages trying to work it out. I am new to programming though so I could well be missing the obvious.
I am trying to use the random class in a program but receive the following:
Dim randomObject As Random = New Random
The Random is underlined and a message saying "type expected". I have Imports.System and have tried Imports.Random but have not been able to resolve the problem. Funny though, when doing the same thing in a Console application I do not encounter the same error, it works.
Any ideas anybody, I have spent ages trying to work it out. I am new to programming though so I could well be missing the obvious.
Last edited: