Added select for NeoDictionary.cs

This commit is contained in:
2025-01-03 21:44:03 +00:00
parent 28be9bc539
commit 45671889c3
@@ -82,6 +82,9 @@ namespace GameDevLibrary.Models
public NeoDictionaryItem<TKey, TValue>? LastOrDefault(Func<NeoDictionaryItem<TKey, TValue>, bool> predicate) => public NeoDictionaryItem<TKey, TValue>? LastOrDefault(Func<NeoDictionaryItem<TKey, TValue>, bool> predicate) =>
Items.LastOrDefault(predicate); Items.LastOrDefault(predicate);
public IEnumerable<NeoDictionaryItem<TKey, TValue>> Select<TResult>(Func<NeoDictionaryItem<TKey, TValue>, NeoDictionaryItem<TKey, TValue>> selector) =>
Items.Select(selector);
public void Remove(TKey key) public void Remove(TKey key)
{ {
var index = Items.FindIndex(x => x.Key.Equals(key)); var index = Items.FindIndex(x => x.Key.Equals(key));