Anonymous Types Unify Within An Assembly, Part Two

Last time I noted that any two usages of “the same” anonymous type within an assembly actually unify to be the same type. By “the same” we mean that the two anonymous types have the same property names and types, and that they appear in the same order. new {X = 1, Y = 2…

14

Anonymous types unify within an assembly, Part One

Back in my last post of 2010 I said that I would do an example of anonymous types unifying within an assembly “in the new year”. I meant 2011, but here we are “in the new year” again, so, no time like the present. The C# specification guarantees you that when you use “the same”…

14

What is the defining characteristic of a local variable?

If you ask a dozen C# developers what a “local variable” is, you might get a dozen different answers. A common answer is of course that a local is “a storage location on the stack”. But that is describing a local in terms of its implementation details; there is nothing in the C# language that…

11

Every public change is a breaking change

Here’s an inconvenient truth: just about every “public surface area” change you make to your code is a potential breaking change. First off, I should clarify what I mean by a “breaking change” for the purposes of this article. If you provide a component to a third party, then a “breaking change” is a change…

18

He’s So Dreamy

Happy New Year all! It has just been brought to my attention that this blog and the Programmer Ryan Gosling photo blog share at least one reader: I admit it, I LOL’d. In the interests of total accuracy I’d like to point out that the first entry on the blog contains a subtle error: .NET…

5