Skip to content

Instantly share code, notes, and snippets.

@DaniCCardenas
Created February 1, 2018 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaniCCardenas/a23e5b595eaff94174f46a6877cd1f29 to your computer and use it in GitHub Desktop.
Save DaniCCardenas/a23e5b595eaff94174f46a6877cd1f29 to your computer and use it in GitHub Desktop.
static void EjemploConTickCount()
{
var seed = Environment.TickCount;
var random = new Random(seed);
for (int i = 0; i <= 10; i++)
{
var value = random.Next(0, 5);
Console.WriteLine($"Iteración {i} - semilla {seed} - valor {value}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment