diff --git a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs index b91fe8eb10820d..c5bce875fe9b7e 100644 --- a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs +++ b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.cs @@ -213,10 +213,10 @@ public StringCollection() { } bool System.Collections.IList.IsReadOnly { get { throw null; } } object? System.Collections.IList.this[int index] { get { throw null; } set { } } public int Add(string? value) { throw null; } - public void AddRange(string[] value) { } + public void AddRange(string?[] value) { } public void Clear() { } public bool Contains(string? value) { throw null; } - public void CopyTo(string[] array, int index) { } + public void CopyTo(string?[] array, int index) { } public System.Collections.Specialized.StringEnumerator GetEnumerator() { throw null; } public int IndexOf(string? value) { throw null; } public void Insert(int index, string? value) { } diff --git a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/StringCollection.cs b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/StringCollection.cs index ff0cba7fc19f43..b27aebf5de6287 100644 --- a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/StringCollection.cs +++ b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/StringCollection.cs @@ -69,7 +69,7 @@ public int Add(string? value) /// /// Copies the elements of a string array to the end of the . /// - public void AddRange(string[] value) + public void AddRange(string?[] value) { ArgumentNullException.ThrowIfNull(value); @@ -99,7 +99,7 @@ public bool Contains(string? value) /// Copies the values to a one-dimensional instance at the /// specified index. /// - public void CopyTo(string[] array, int index) + public void CopyTo(string?[] array, int index) { data.CopyTo(array, index); }