'why colon on constructor chaining doesn't work? [closed]

I have a problem while I was study by myself today I did follow everything in the lecture structure carefully but I end up having CS1073 problem...

using System;
using System.Collections.Generic;
using System.Text;

namespace Shape_Rectangle
{
    class AExample
    {
        public void animal()
        {
            Console.WriteLine("C A");
        }
        public void animal(string p1)
        {
            Console.WriteLine("C B" + p1);
        }
        public void animal(string p1, string p2) : this(p1)
        {
            Console.WriteLine("C C" + p2);
        }
    }
}

and it keep saying that the ":" in this -> public void animal(string p1, string p2) : this(p1) is having a problem anyone have any idea what did I do wrong here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source