Advertisement
Guest User

Correzione random

a guest
Jan 23rd, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9. static class valoriRandom
  10. {
  11. static Random r = new Random();
  12.  
  13. static public int valRndom()
  14. {
  15. return r.Next(0, 1000);
  16. }
  17. }
  18. }
  19.  
  20.  
  21. public Mezzo(string t, int c, string m, string mo, int l, int a)
  22. {
  23. num = num = valoriRandom.valRndom();
  24. targa = t;
  25. cilindrata = c;
  26. marca = m;
  27. modello = mo;
  28. larghezza = l;
  29. altezza = a;
  30. tariffa = 0.0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement