From 230b5b167c6a47558b9adf292d4634cf41f1d797 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 5 Nov 2020 20:07:37 -0500 Subject: [PATCH] Update SharedPerformanceCounter assert (#44333) --- .../src/System/Diagnostics/SharedPerformanceCounter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs index 8d9dfd3..633730d 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs @@ -697,7 +697,7 @@ namespace System.Diagnostics } else { - Debug.Assert(counterNamesObject is string[], $"Expected string[], got '{counterNamesObject}' with kind '{categoryKey.GetValueKind("Counter Names")}'for category '{_categoryName}'"); + Debug.Assert(counterNamesObject is string[], $"Expected string[], got '{counterNamesObject}' of type '{counterNamesObject?.GetType()}' with kind '{categoryKey.GetValueKind("Counter Names")}' for category '{_categoryName}'"); string[] counterNames = (string[])counterNamesObject; for (int i = 0; i < counterNames.Length; i++) counterNames[i] = counterNames[i].ToLowerInvariant(); -- 2.7.4