C#11preview: Type-safe interchangeable units

In a previous post, I discussed static abstracts in interfaces, and while it is quite a nice feature, it falls short in some corner cases – particularly in implicit type-conversions. I’m not sure if it should, but… it’s complicated. As an example, I will consider the concept of interchangeable units. Wouldn’t it be neat, if … Read more

Mimicking Delegates in C# with GOF Observers

How far could we get trying to implement our own delegate types? How are are delegates related the observer pattern? In this less serious but technically interesting post, we explore the relation between delegates and observers, look at how close we could and our ability to implement our own delegate type; or at least imitate … Read more

Are interfaces like contracts?

I have tought Object Oriented Programming for a number of years and in my time completed more than a thousand oral exams at bachelor level computer science and software engineering students. Overall, it seems object oriented programming can be difficult to comprehend, but clearly the concept of interfaces is one of the harder topics. Interfaces … Read more