The base keyword with inheritance. (C#, .NET Framework)

Using the keyword "base" allows us to access members of the base class from within a derived class (child class).

For example, if we've created a constructor in the parent class and want our child class to inherit its properties.


        public CookieOrder(int orderNumber,
            string recipientName,
            string cookieType,
            int dozens)
            OrderNumber = orderNumber;
            RecipientName = recipientName;
            CookieType = cookieType;
            Dozens = dozens;



Full code available at:

No Comments Yet