Skip to content

Commit

Permalink
Add a string indexer to Slots, to shadow the inherited one from Colle…
Browse files Browse the repository at this point in the history
…ction.
  • Loading branch information
int19h committed Dec 1, 2018
1 parent 5929192 commit 3ed5a46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WarBender/Slots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ protected override void OnItemAdded(long item, int index) {
Raw[index] = RawValue(value);
}

public new object this[string key] {
get => this[GetIndexOfKey(key)];
set => this[GetIndexOfKey(key)] = value;
}

IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();

public new IEnumerator<object> GetEnumerator() {
Expand Down

0 comments on commit 3ed5a46

Please sign in to comment.