Random Seed

I would like to use the pseudo-random number generation capability of NETMF, but in truth it seems reasonably predictable with not a great deal of randomness to it at all. One of the overloads of the instantiation method allows a seed to be used to kick off the randomness of the number returned.

Can anyone suggest a reasonable seed, perhaps number of machine ticks since power on (and how I might obtain that information) for example, that might be useful in improving the randomness of the sequence?

perhaps you can leverage this ?

1 Like

@ Brett - Learnt some things but could still do with a moderately random seed to start things off with. Is there anyway to access the amount of time the MCU has been running, or something similar. I’m afraid there’s not RTC on board.

@ Jason -


Utility.GetMachineTime Method

1 Like

Many thanks. I’ll take a look.