thanks to help from dotnetperls.
static Random _r = new Random();static void F(){// Use class-level Random so that when this// method is called many times, it still has// good Randoms.int n = _r.Next(12);// If this declared a local Random, it would// repeat itself.System.Console.WriteLine(n);}
No comments:
Post a Comment