diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs index 7eedd71a9b0..6ad2c1a9869 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XamlTypeInvoker.cs @@ -15,7 +15,6 @@ namespace System.Xaml.Schema public class XamlTypeInvoker { private static XamlTypeInvoker s_Unknown; - private static object[] s_emptyObjectArray = Array.Empty(); private Dictionary _addMethods; internal MethodInfo EnumeratorMethod { get; set; } @@ -226,7 +225,7 @@ public virtual IEnumerator GetItems(object instance) throw new NotSupportedException(SR.Get(SRID.OnlySupportedOnCollectionsAndDictionaries)); } MethodInfo getEnumMethod = GetEnumeratorMethod(); - return (IEnumerator)SafeReflectionInvoker.InvokeMethod(getEnumMethod, instance, s_emptyObjectArray); + return (IEnumerator)SafeReflectionInvoker.InvokeMethod(getEnumMethod, instance, Array.Empty()); } // vvvvv---- Unused members. Servicing policy is to retain these anyway. -----vvvvv