public T this[int x, int y, int z] { get { var row = content[x]; var column = row?[y]; return(column?[z]); } set { var xList = content[x]; if (xList == null) { content[x] = new InfiniteCollection <InfiniteCollection <T> >(); xList = content[x]; } var yList = xList[y]; if (yList == null) { xList[y] = new InfiniteCollection <T>(); yList = xList[y]; } yList[z] = value; } }
public ThreeDimensionalList() { content = new InfiniteCollection <InfiniteCollection <InfiniteCollection <T> > >(); }