Monthly Archives: November 2018

C# – Concept: Upcasting & Downcasting

Upcasting is compile time; therefore, generally it works if the code was built properly.     public class Employee { decimal RatePerHour; string FullName; date BirthDate; } public class Manager : Employee { string ParkingStallNum; decimal AnnualBonus; }     … Continue reading

Posted in Uncategorized | Leave a comment

C# 3- Auto-Implemented Properties

In C# 3.0 and later, auto-implemented properties make property-declaration more concise when no additional logic is required in the property accessors. They also enable client code to create objects. When you declare a property as shown in the following example, … Continue reading

Posted in Uncategorized | Leave a comment

Design Pattern – Dependency Injection (DI)

Spending time recently working with ASP.NET Core, I came across the concept of dependency injection (DI). At a high level DI is about obtaining Inversion of Control between classes and their dependencies. A dependency is an object that another object … Continue reading

Posted in Design Pattern | Leave a comment

C# – Interfaces

An interface is similar to a class but it provides a specification rather than an implementation for its members. Interface members are all implicitly abstract. In contrast, a class can provide both abstract members and concrete members with implementations. A … Continue reading

Posted in Uncategorized | Leave a comment