diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs index c894f98e526d..bbfba16a7f2c 100644 --- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs @@ -224,7 +224,7 @@ private void OnTimer() // above, since WritePayload callback can contain user code that can invoke EventSource constructor // and lead to a deadlock. (See https://github.com/dotnet/runtime/issues/40190 for details) - foreach (var counter in _counters) + foreach (var counter in counters) { // NOTE: It is still possible for a race condition to occur here. An example is if the session // that subscribed to these batch of counters was disabled and it was immediately enabled in