Example #1
0
        static void Main(string[] args)
        {
            Cat cat1 = new Cat(
                "name1", 11, Cat.Colors.Black);
            Cat cat2 = new Cat(
                "name2", 21, Cat.Colors.Green);
            Cat cat3 = new Cat(
                "name1", 11, Cat.Colors.Black);

            string str = cat1.toString();

            Console.WriteLine(str);

            cat2.name = "name3";

            Console.WriteLine(Cat.template);
            Console.WriteLine($"Age: {cat2.GetAge()}");

            bool result1 = cat1.Compare(cat3);

            Console.WriteLine(result1);

            bool result2 = Cat.Compare(cat1, cat3);

            Console.WriteLine(result2);

            bool result3 = cat1 == cat3;

            Console.WriteLine(result3);
        }