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 8d9dfd334d78b..633730d6bb14d 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();