The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Aug 7, 2006
Post comments count 0
Post likes count 0

Even more about C# anonymous methods, from the source

Raymond Chen

If you want to know still more about C# anonymous methods, you can check out the web site of Grant Richins who has an entire category devoted to anonymous methods, and he should know, since he actually implemented them. Now that CLR week is over, I'm curious what you all thought of it. Would you like to see another CLR week at some point? Should I stick to Win32? (Or doesn't it matter because I'm an arrogant Microsoft apologist either way?)

Aug 7, 2006
Post comments count 0
Post likes count 0

The day Tully's ran out of coffee

Raymond Chen

Today, Tully's coffee shops begin offering free Wi-Fi (in shops where Wi-Fi is available). Tully's isn't as widespread as Starbucks, but it's the best of the major chain coffee shops in the Seattle area, according to a highly unscientific poll of my friends. Seeing Tully's name back in the news reminded me of an incident that occurred to one of my colleagues, who went into the local Tully's one evening and asked for a cup of drip coffee. The Tully's employee went to the pot, then turned around and said, "Actually, we don't have any coffee." My colleague did get a profuse apology from the district manager, who ...

Aug 4, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 3)

Raymond Chen

How local variables are captured.

Aug 3, 2006
Post comments count 0
Post likes count 0

News Flash: Big houses also cost more to cool

Raymond Chen

Perhaps as a counterpart to the fact that big houses have bigger heating bills, NPR yesterday pointed out that bigger houses use more electricity for cooling. (NPR looks not at the "surprise" of big-house owners over the cost of energy, but rather the consequences of these big houses on the energy grid. But the headline was hard to pass up.)

Aug 3, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 2)

Raymond Chen

When the anonymous class becomes visible.

Aug 2, 2006
Post comments count 0
Post likes count 0

The implementation of anonymous methods in C# and its consequences (part 1)

Raymond Chen

First we'll look at how they're implemented.

Aug 1, 2006
Post comments count 0
Post likes count 0

C# nested classes are like C++ nested classes, not Java inner classes

Raymond Chen

When you declare a class inside another class, the inner class still acts like a regular class. The nesting controls access and visibility, but not behavior. In other words, all the rules you learned about regular classes also apply to nested classes. The keyword in an instance methods of a class (nested or not) can be used to access members of that class and only those members. It cannot be used to access members of other classes, at least not directly. (And the can be omitted when it would not result in ambiguity.) You create an instance of a class (nested or not) by saying where are the parameters to an...

Jul 31, 2006
Post comments count 0
Post likes count 0

Christmas gift idea for your favorite glasses-wearing geek

Raymond Chen

Yes, I'm talking about Christmas gifts (or "winter solstice gifts" if you prefer) in July. I'm one of those people for whom buying Christmas gifts is a brain-wracking ordeal, and I'm always on the lookout all year round for the "perfect gift". Last Christmas, a friend of mine gave me a micro-fiber lens-cleaning cloth that comes in a pouch you can attach to a keychain. Example 1. Example 2. (I have no affiliation with those two sites; I just hunted around looking for a picture.) Best gift ever. I use it several times a day. My keychain has only four things on it: The aforementioned cleaning cloth, a ...

Jul 31, 2006
Post comments count 0
Post likes count 0

Just because I don't write about .NET doesn't mean that I don't like it

Raymond Chen

Some people have inferred that I don't write about .NET because I don't like it. That's not true. I use it myself. The reason I don't write about .NET is because I'm not an expert on it and there are plenty of other .NET blogs out there, written by people who are actual experts. (Such as Maoni Stephens, whose little finger contains more knowledge about garbage collection than most people have in their entire brain.) No point adding to it with my non-expert view. Indeed, when I hit upon an interesting .NET topic or puzzle, I usually just forward it off to Brad for him to put on his blog. Because people looking ...