public void AddCat(ref Cat cat) { Cat[] temp = new Cat[++CatCaunt]; if (Cats != null) { Cats.CopyTo(temp, 0); } temp[temp.Length - 1] = cat; Cats = temp; }
public void AddCat(ref Cat cat) { Console.WriteLine("Adding..."); System.Threading.Thread.Sleep(999); Cat[] temp = new Cat[++CatCount]; if (Cats != null) { Cats.CopyTo(temp, 0); } temp[temp.Length - 1] = cat; Cats = temp; }