Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- From: Joergen Bech <jbech<NOSPAM>@<NOSPAM>post1.tele.dk>
- Date: Sat, 31 Dec 2005 15:50:23 +0100
Do you have a direct link to that sample?
To me, that looks like VB6 code. Not the way it would be
written in VB.Net.
/JB
On Sat, 31 Dec 2005 15:33:08 +0100, "m.posseth"
<michelp@xxxxxxxxxxxxxxx> wrote:
>The code i showed i have also run ,,, and it worked as dices in my situation
>
>also nice thingy is that alter after the comments i searched the msdn site
>and saw that MS does it the same way
>
>Dim MyValue As Integer
>Randomize ' Initialize random-number generator.
>MyValue = CInt(Int((6 * Rnd()) + 1)) ' Generate random value between 1 and
>6.above is MS code
>
>regards
>
>Michel Posseth [MCP]
>
>
>"Cap'n Ahab" <space.invader@xxxxxxxxx> wrote in message
>news:1136038996.771316.258300@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>I have also noticed that instead of using Shared, if I rewrite the
>> New() constructor by adding the Randomize() command as below...
>>
>> Public Sub New()
>> Randomize()
>> Me.Roll()
>> End Sub
>>
>> and then consume 3 objects based on the Die Class,
>>
>> Then use the same loop..
>>
>> Dim One As New Die
>> Dim Two As New Die
>> Dim Three As New Die
>>
>> Do
>>
>> One.Display()
>> One.Roll()
>> Two.Display()
>> Two.Roll()
>> Three.Display()
>> Three.Roll()
>>
>> Loop Until UCase(Console.ReadLine) = "Q"
>>
>> That the results are not random between the die at all!! The numbers
>> either are 3 of a the same number OR a pair of numbers an other other
>> number - no exceptions. How very odd!
>>
>> Now I AM confused, lol.
>>
>
.
- Follow-Ups:
- References:
- My FIRST Class!! But it doesn't work as expected - please HELP!
- From: Cap'n Ahab
- Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- From: Joergen Bech
- Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- From: Cap'n Ahab
- Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- From: Cap'n Ahab
- Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- From: m.posseth
- My FIRST Class!! But it doesn't work as expected - please HELP!
- Prev by Date: Re: Error
- Next by Date: Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- Previous by thread: Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- Next by thread: Re: My FIRST Class!! But it doesn't work as expected - please HELP!
- Index(es):
Relevant Pages
|