I have a small collection of puzzles and corner cases, and I'm constantly interested in learning more. The page mainly deals with bits and pieces of the C# language, although I also find the fundamentals of.NET interesting. Here's one that isn't on the page but that I think is incredible:
string x = new string(new char[0]);
string y = new string(new char[0]);
Console.WriteLine(object.ReferenceEquals(x, y));
Since "new" (when used with a reference type) always creates a new object, I would expect it to print False. It should, according to the specifications for both C# and the CLI. Well, not in this specific instance. On every version of the framework I've tested it with, it prints True. (I must admit that I haven't tried it on Mono.)
Just to be clear, I wasn't specifically searching for a discussion or explanation of this peculiarity; this is merely an example of the kind of stuff I'm looking for. I was really looking for comparable strange behaviour (it's not the same as usual string interning; in particular, string interning doesn't typically happen when a function Object() { [native code] } is invoked.)
Any other gems lurking out there?