2 ms·
Simply: orderItems.CalculateTaxes(); If orderItems implements IOrderItems. Just have to include a using statement for the namespace it's in, it's an exte
by mattmanser 15y ago
Simply:
orderItems.CalculateTaxes();
If orderItems implements IOrderItems.
Just have to include a using statement for the namespace it's in, it's an extension method. Look them up if you're unsure.
I didn't know you could do that with them, it's pretty cool. Although it's kinda what abstract classes and inheritance is for, but you can only inherit from one in C#.