Skip to content

Commit

Permalink
random.Value is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
mic-max committed Jan 9, 2023
1 parent a6c3b92 commit 8a55a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/event-counters/Examples.EventCounters/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ThreadLocal<Random> 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()
Expand Down

0 comments on commit 8a55a3d

Please sign in to comment.