how do i get an object to display a number between 1 and 9
i have used the code
object = 1
Or 2 Or 3 Or 4 Or 5 Or 6 Or 7 Or 8 Or 9however, it only displays the number 15 instead of a number between 1 and 9
how do i get an object to display a number between 1 and 9
i have used the code
object = 1
Or 2 Or 3 Or 4 Or 5 Or 6 Or 7 Or 8 Or 9however, it only displays the number 15 instead of a number between 1 and 9
displaying a number
Mardy
gottumala
What are you trying to do here Generate a random number It's better to do some research than take a wild guess how to do stuff.
http://www.google.com.au/search hl=en&q=VB.NET+random+number&meta=
The code that you've written does a bunch of bit OR operations. An OR is used to combine values, a bit is set if it's set in either value. This means that in binary, 1 and 2 are represented as 1 and 10, and an OR gives 11. So, the numbers here are
1
10
11
100
101
110
111
1000
1001
and ORing them gives
1111
which is 15.