Exemple #1
0
        //Methods and Classes
        static void Main(string[] args)
        {
            Dog myDog = new Dog();//instantiating an object for use - this is default constructor
            Console.WriteLine(myDog.Name);//using counsel class to use the writeline method
            myDog.Woof();//calling this from the Woof method

            Dog mySecondDog = new Dog("Tricycle", "Dotted");
            mySecondDog.Name = "Oreo";
            mySecondDog.Woof();
            mySecondDog.Wag();
        }