How do I generate a random integer in C#?
There are a number utility functions or services that are better cached in the same way that System.Random should be, so it lends itself to a generic implementation:
static public class CachedService where T : new() {
static public T Get { get; } = new T();
}
To use for random (or similar):
CachedService.Get.Next(999);