I'm working now on a project with c# and windows form , I have to generate random floating numbers between 0,1 using random rand= new random() ;
, my problem is the randoms are correct only in the debug section when it display on gridview but in the run section the first random number is fixed all the time on the gridview doesn't change . is there any solution ??
I assume you create a new Random instance on every call. Keep using one instance and call
rand.NextDouble(); on that instance.