private void btnCreate_Click(object sender, System.EventArgs e) { int size = 2; // set default floor size to 2x2 // if the user has a home, load it // otherwise create a new one bool newHome = (home == null); if (newHome) { size = (int)cboFloorSize.SelectedValue; } else { // http://stackoverflow.com/questions/4106369/how-do-i-find-the-size-of-a-2d-array size = home.Rooms.GetLength(0); } FloorPlan.getInstance(size, size, newHome).Show(); getInstance().Hide(); }