vendredi 6 mai 2022

Vbnet to C# Equivalent?

Having some trouble with this line

Dim varA As String = CStr(CLng((999 - 111 + 1) * Rnd() + 111))

What would the C# equivalent of Rnd() be? This is what I have

string varA= System.Convert.ToString(Convert.ToInt64((999 - 111 + 1) * rnd.Next(0,111)));

Thanks!




Aucun commentaire:

Enregistrer un commentaire