From 8a55a3d11b90aebb9bd9d7935592379f916963ed Mon Sep 17 00:00:00 2001 From: Michael Maxwell Date: Mon, 9 Jan 2023 13:26:08 -0800 Subject: [PATCH] random.Value is not null --- examples/event-counters/Examples.EventCounters/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/event-counters/Examples.EventCounters/Program.cs b/examples/event-counters/Examples.EventCounters/Program.cs index 4a5c13804a..fc98de6fbb 100644 --- a/examples/event-counters/Examples.EventCounters/Program.cs +++ b/examples/event-counters/Examples.EventCounters/Program.cs @@ -22,7 +22,7 @@ ThreadLocal random = new(() => new Random()); using EventSource eventSource = new("MyEventSource"); using EventCounter eventCounter = new("MyEventCounter", eventSource); -using PollingCounter pollingCounter = new("MyPollingCounter", eventSource, () => random.Value.NextDouble()); +using PollingCounter pollingCounter = new("MyPollingCounter", eventSource, () => random.Value!.NextDouble()); // Create and Configure Meter Provider using var meterProvider = Sdk.CreateMeterProviderBuilder()