struct Brick
                  
                  
                      {
                  
                  
                          public int x;
                  
                  
                          public int y;
                  
                  
                      }
                  
                  
                  
                  
                  
                      struct CompositeBrick
                  
                  
                      {
                  
                  
                          int x;
                  
                  
                          int y;
                  
                  
                  
                  
                  
                          Brick.x = 20;
                  
                  
                          Brick.y = 30;
                  
                  
                      }
                  
                  
                
struct you mean array?
I think you intend to create a Brick property inside CompositeBrick?
I need create structure Brick where will be int x; and int y; Then i need create structure CompositeBrick where will be array of Bricks, int x and int y. So something like this: public Brick(int _x, int _y) { x = _x; y = _y; } } struct CompositeBrick { public int x; public int y; Brick[] kosky; } Next is the problem :D I have method where i need create compositeBrick and create array of Bricks
And what is the problem?
I dont know how create instance of CompositeBrick where will be array of bricks
Обсуждают сегодня