Skip to main content

Practice · 3 of 4

A generic PairStore<T>

CHALLENGE
Difficulty: beginner+25 XP

Implement nested generic class Solution.PairStore<T>: Add(T item) appends; Count read-only; Get(int index) returns the item at index and throws ArgumentOutOfRangeException when out of range; Clear() empties. All state private behind properties/methods.

Back to lesson: Practice: Generics workout