Generic in C# – Basic Practice Example

Generic is a feature of C# programming language, which helps us save a lot of repeating works in our journey. It is efficient and widely used in practice. Background Imaging, we need to add many items into a list; and these items might be String, Integer, etc. Without Generic, we need to write at least…

Case Study – Event Practice in C#

In C# practice, we always use Event as an observer for property modification. In this post, I am sharing a practice case regarding piggy bank monitoring. Background A piggy bank can help us with saving an amount of money that we planned. Every time, we deposit gold coins into the piggy bank, the balance will…

C# Case Study – Delegate as a Method in Practice

Case Background A courier company ships parcels in the local area. There are four zones in the company’s business area. The shipping fees are a certain percentage of the given item price. Some destinations are a bit dangerous or far from the company’s depot, which has an additional risk fee $25. Zone 1 – 25%…