From 73ac1a91d5c196819c39b18ac4ac04479a4b665b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 5 Nov 2020 17:50:19 -0500 Subject: [PATCH] Update SharedPerformanceCounter assert --- .../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 8d9dfd334d78b4..633730d6bb14d5 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 @@ private unsafe CategoryData GetCategoryData() } 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();