Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
 public ThreeDimensionalList()
 {
     content = new InfiniteCollection <InfiniteCollection <InfiniteCollection <T> > >();
 }