When you need to be able to generate a random number from a seed, and guarantee it be the same number across different versions of the .NET Framework and Mono Framework, as-well as across different architectures (x86, x64), what do you do?
I'm presently considering storing millions of random bytes in a file for use as a temporary solution to this problem, but I think there's probably a better way (hopefully not too much more complicated).
If you need a truly portable implementation, the best option would probably be to just use a custom random number generator, such as this Mersenne Twister implementation or Colin Green's Fast Random Number Generator. By controlling the implementation, you can guarantee that you'll get the same results given the same seed on any platform.
There's also the
Troschuetz.Random
library available through NuGet which provides several "standard" randomization methods which are presumably available on other platforms as well:All the hard work behind this library was done by Stefan Troschütz and optimized within this .NET package by Alessio Parma.
Got following code from Wiki: http://en.wikipedia.org/wiki/Random_number_generation
This should be what you need: http://en.wikipedia.org/wiki/Linear_congruential_generator