Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SimpleSortedList(IComparer<T> comparison, int capacity)
- {
- if (capacity < 0)
- {
- throw new ArgumentException("Capacity cannot be negative");
- }
- this.comparison = comparison;
- this.innerCollection = new T[capacity];
- }
- public SimpleSortedList(int capacity)
- : this(Comparer<T>.Create((x, y) => x.CompareTo(y)), capacity)
- {
- }
- public SimpleSortedList(IComparer<T> comparison)
- : this(comparison, DefaultCapacity)
- {
- }
- public SimpleSortedList()
- : this(Comparer<T>.Create((x, y) => x.CompareTo(y)), DefaultCapacity)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment