vendredi 24 janvier 2020

c# Which is the better way to give random number to function

Which is better and is there a difference in the random results ?

 void Func1(Random rand)
{
var num=rand.Next();
}

 void Func2(ref Random rand)
{
var num=rand.Next();
}



Aucun commentaire:

Enregistrer un commentaire