(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
| 171 | } |
| 172 | |
| 173 | public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) |
| 174 | { |
| 175 | ArgumentNullException.ThrowIfNull(array); |
| 176 | if (arrayIndex < 0) |
| 177 | { |
| 178 | throw new ArgumentOutOfRangeException(nameof(arrayIndex)); |
| 179 | } |
| 180 | |
| 181 | if (array.Length - arrayIndex < Count) |
| 182 | { |
| 183 | throw new ArgumentException("The destination array is too small.", nameof(array)); |
| 184 | } |
| 185 | |
| 186 | if (_hasNullKey) |
| 187 | { |
| 188 | array[arrayIndex++] = new KeyValuePair<TKey, TValue>(default!, _nullValue); |
| 189 | } |
| 190 | |
| 191 | foreach (KeyValuePair<TKey, TValue> entry in _nonNullEntries) |
| 192 | { |
| 193 | array[arrayIndex++] = entry; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | public bool Remove(KeyValuePair<TKey, TValue> item) |
| 198 | { |
no outgoing calls
no test coverage detected