I would like to generate a random number.
Currently im using the folowing:
private void GeraPadraoProjetado()
int seed = 2; //chosen randomly by me
Random fixRand = new Random(seed);
PadraoProjetado[i] = (int)(256*fixRand.NextDouble());
As I have observed, the generated numbers are always the same each time I execute the program.
When I programed in Visual Basic, I remember we had to use the "Randomize()" function before using the function that generated the random numbers in order to essure that the numbers would be actualy random.
Does anyone know what to do in C#?
Thanks in advance!]
Ps.: Excuse me about the code indentation, I simply didnt know how to do it here.
0 · ·