public static void Main(string[] args) { Dogs puppy = new Dogs("Bob", "Rick", 1, Dogs.Gender.Male); puppy.Bark(3); Console.Out.WriteLine(puppy.GetTag()); }
static void Main(string[] args) { Console.WriteLine("First dog => "); var name1 = Console.ReadLine(); var breed1 = Console.ReadLine(); Dogs first = new Dogs(name1, breed1); Console.WriteLine("Second dog => "); Dogs second = new Dogs(); second.Name = "Rex"; second.Breed = "Deutsche dog"; Dogs third = new Dogs(); Dogs[] arrFromDogsData = new Dogs[] { first, second, third }; foreach (Dogs dog in arrFromDogsData) { dog.Bau(); } }