Added select for NeoDictionary.cs
This commit is contained in:
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user