using System; HardDiskDrive disk1 = new HardDiskDrive(10000, "WD", "SX04044", 1000, 10000); int[] pole = new int[] { 2, 4, 6 }; Console.WriteLine(pole[0]); bool[] pBool = new bool[20]; Console.WriteLine(pBool.Length); int[,,] pole3d = new int[3, 6, 9]; int number = 0; int[][] polePoli = new int[3][]; polePoli[0] = new int[] { 1, 2, 3, 4, 5}; polePoli[1] = new int[] { 6, 7, 8}; polePoli[2] = new int[] { 1}; printPolePoli(polePoli); void printPolePoli(int[][] pole) { foreach(var radek in pole) { foreach(var prvek in radek) { Console.Write($"{prvek},"); } Console.WriteLine(); } } for (int i=0; i<3; i++) { for (int j=0; j<6; j++) { for (int k=0; k<9; k++) { pole3d[i, j, k] = number; number++; } } } print3dArray(pole3d); void print3dArray(int[,,] arr3d) { for (int i = 0; i < arr3d.GetLength(0); i++) { for (int j = 0; j < arr3d.GetLength(1); j++) { for (int k = 0; k < arr3d.GetLength(2); k++) { Console.Write($"{ arr3d[i, j, k]},"); } Console.WriteLine(""); } Console.WriteLine(); Console.WriteLine(); } } int[,] pole2d = new int[3, 2] {{1, 2}, { 3,4}, { 5,6}}; Console.WriteLine(pole2d.Rank); Counter c = new Counter(3); c.Increment(); c.Increment(); Console.WriteLine(c.GetCurrent()); c.Decrement(); Console.WriteLine(c.GetCurrent()); public class Counter { private int _counter; private int step; public Counter() { step = 1; } public Counter(int step) { this.step = step; } public void Increment() { _counter += step; } public void Decrement() { _counter -= step; } public int GetCurrent() { return _counter; } } public class HardDiskDrive { public const string Name = "Hard disk drive"; private uint capacity; private string manufacturer; private string partNumber; public uint BufferSize; public uint WriteSpeed; public string StoreName => manufacturer + partNumber; public uint GetFreeSpace() { return 0; } public bool WriteNumber(int number, uint position) { return true; } public int ReadNumber(uint position) { return 0; } public HardDiskDrive(uint capacity, string manufacturer, string partNumber, uint bufferSize, uint writeSpeed) { this.capacity = capacity; this.manufacturer = manufacturer; this.partNumber = partNumber; BufferSize = bufferSize; WriteSpeed = writeSpeed; } }