public NestedIndexer this[int index] { get { if (index < 0 || index >= size.width) { throw new IndexOutOfRangeException("index exceeds specified buffer width."); } if (cachedIndexers.ContainsKey(index)) { return(cachedIndexers[index]); } NestedIndexer res = new NestedIndexer(index, this); cachedIndexers[index] = res; return(res); } }
public NestedIndexer this[int index] { get { if (index < 0 || index >= size.width) { throw new IndexOutOfRangeException("index exceeds specified buffer width."); } if (cachedIndexers.ContainsKey(index)) { return cachedIndexers[index]; } NestedIndexer res = new NestedIndexer(index, this); cachedIndexers[index] = res; return res; } }