Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public T this[int i]
- {
- get
- {
- T item = default(T);
- if (list.Count > 0)
- {
- if (i < list.Count && i >= 0)
- {
- item = list[(list.Count - 1) - i];
- }
- else
- {
- throw new ArgumentOutOfRangeException();
- }
- }
- return item;
- }
- set
- {
- if (list.Count > 0)
- {
- if (i < list.Count && i >= 0)
- {
- list[(list.Count - 1) - i] = value;
- }
- else
- {
- throw new ArgumentOutOfRangeException();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement