Пример #1
0
 public Array(ArraySize size)
 {
     _lock = new object();
     lock (_lock) {
         _size = size;
         _data = new ArrayLine <T> [ToArrayCoord(_size.maxZ)];
         for (int z = 0; z < ToArrayCoord(_size.maxZ); z++)
         {
             _data [z] = new ArrayLine <T> (_size);
         }
     }
 }
Пример #2
0
 public Array(int x, int z)
 {
     _lock = new object();
     lock (_lock) {
         _size = new ArraySize()
         {
             maxX = x, maxZ = z
         };
         _data = new ArrayLine <T> [ToArrayCoord(_size.maxZ)];
         for (int i = 0; i < ToArrayCoord(_size.maxZ); i++)
         {
             _data [i] = new ArrayLine <T> (_size);
         }
     }
 }