예제 #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;
            }
        }
예제 #2
0
 public ThreeDimensionalList()
 {
     content = new InfiniteCollection <InfiniteCollection <InfiniteCollection <T> > >();
 }