diff --git a/content/en/docs/instrumentation/net/getting-started.md b/content/en/docs/instrumentation/net/getting-started.md index 780aa6a11d96..37eadeabc2ca 100644 --- a/content/en/docs/instrumentation/net/getting-started.md +++ b/content/en/docs/instrumentation/net/getting-started.md @@ -69,8 +69,7 @@ string HandleRollDice([FromServices]ILogger logger, string? player) int RollDice() { - var rng = new Random(); - return rng.Next(1, 6); + return Random.Shared.Next(1, 7); } app.MapGet("/rolldice/{player?}", HandleRollDice);