Showing results for August 2013 - Page 3 of 3 - The Old New Thing

Aug 8, 2013
0
0

On partially-constructed objects, additional remarks, not as interesting

Raymond Chen
Raymond Chen

Don't worry. Our long national nightmare of CLR week is almost over. I had originally planned to write an article about partially-constructed objects, but in the time since I queued up the topic (back in November 2005) to the time I got around to writing it up, I found that Joe Duffy had already written it for me! On partially-constructed ob...

Code
Aug 7, 2013
0
0

Weak references have no effect on object lifetime

Raymond Chen
Raymond Chen

The class lets you retain a reference to an object while still permitting the object to be garbage collected. When that happens, then the property is and the property is . (Related discussion.) Note, however, that weak references do not alter the decision of the garbage collector whether or not an object is garbage. It merely lets you observe ...

Code
Aug 6, 2013
0
0

Sometimes sports-rule lawyering comes true: The strikeout with only one thrown pitch

Raymond Chen
Raymond Chen

Some time ago, I engaged in some sports-rule lawyering to try to come up with a way the losing team could manage to salvage a win without any remaining at-bats. It involved invoking a lot of obscure rules, but astonishingly one of the rules that I called upon was actually put into effect a few days ago. The Crawfish Boxes provides an entertaini...

Non-Computer
Aug 6, 2013
0
0

The mysterious ways of the params keyword in C#

Raymond Chen
Raymond Chen

If a parameter to a C# method is declared with the keyword, then it can match either itself or a comma-separated list of um itselves(?). Consider: This program prints The first call to does not take advantage of the keyword and passes the array explicitly (formally known as normal form). The second call, however, specifies the integers d...

Code
Aug 5, 2013
0
0

A practical reason for shutting down for the Mayan apocalyse

Raymond Chen
Raymond Chen

I dreamed that Costco announced that they were closing for the Mayan apocalypse and would reopen two weeks later. Not because they believed in it. Rather, because that was their estimate as to how long it would take people to get through their stockpiles and be ready to go shopping again. Curiously, I had this dream several weeks after the apoca...

Non-ComputerDream
Aug 5, 2013
0
0

Why does BitConverter.LittleEndian return false on my x86 machine?

Raymond Chen
Raymond Chen

Welcome to CLR Week 2013, returned from its two-year hiatus. A customer reported that when they checked with the debugger, reported even though they were running on an x86 machine, which is a little-endian architecture. The bytes are extracted in little-endian order, despite the claim that the machine is big-endian. "I don't get it." I d...

Code
Aug 1, 2013
0
0

The case of the auto-hide taskbar

Raymond Chen
Raymond Chen

A customer reported that their taskbar would sometimes spontaneously go into auto-hide mode. What made this particularly insidious was that they had deployed a group policy to prevent users from changing the auto-hide state (because they never wanted the taskbar to auto-hide), so when the taskbar went into auto-hide mode, there was no way to get i...

Other