A new fabulous adventure

Tomorrow, the 30th of November, 2012, is the first day of my fifth decade here on Earth, and my last day at Microsoft. (*) I’ve been working at Microsoft full-time since 1996 and had two years of internships before that. Microsoft is an awesome company. We do great work here: work that changes the way…


Why is deriving a public class from an internal class illegal?

In C# it is illegal to declare a class D whose base class B is in any way less accessible than D. I’m occasionally asked why that is. There are a number of reasons; today I’ll start with a very specific scenario and then talk about a general philosophy. Suppose you and your coworker Alice…


It’s still essential!

I am pleased to announce that Essential C# 5.0 by Mark Michaelis, and, new for this edition, yours truly, is available for pre-order now. It will be in stores in early December. As long-time readers of this blog know, I was one of the technical editors for Essential C# 4.0 and Essential C# 3.0. Mark…


Dynamic contagion, part two

Last time I discussed how “dynamic” tends to spread through a program like a virus: if an expression of dynamic type “touches” another expression then that other expression often also becomes of dynamic type. Today I want to describe one of the least well understood aspects of method type inference, which also uses a contagion…


Dynamic contagion, part one

Suppose you’re an epidemiologist modeling the potential spread of a highly infectious disease. The straightforward way to model such a series of unfortunate events is to assume that the population can be divided into three sets: the definitely infected, the definitely healthy, and the possibly infected. If a member of the healthy population encounters a…