public StorageSystem() { _boxes = new Box[31]; for(int i = 0; i < _boxes.Length;i++) { _boxes[i] = new Box() { BoxId = i + 1, Name = string.Format("Box {0}", i + 1) }; } }
static void Main(string[] args) { //DataTable results; DBTools.OpenDB(); //using (DbCommand cmd = new SqlCommand("SELECT * FROM pokemon LIMIT 1")) //{ // results = DBTools.GetData(cmd); //} Box box = new Box(); for (int i = 0; i < box.Pokemon.Count; i++) { box[i] = (new Pokemon() { }); } DBTools.CloseDB(); }