Thursday, February 12, 2004 - Posts

A .NET Riddle.

A riddle of small stature but .NET nonetheless ...

I was looking deep into the Rotor source code yesterday and came across this really weirdo thing which sent those shock waves up the grey cells ... A really strange phenomena has been occurring right under all our noses and many didn't know what it was. So i decided to post about it and for fun make it as a riddle instead of an informative post ( dont curse me yet !). I did debug Rotor to its roots to find out the internal working but i know that i would definitely not be able to express the details anywhere close to what could be explained by folks back at the big house. Here it is.

What is the only Type in .NET which has only a non-public constructor and the method body of which throws up a NotImplemented Exception. If so how is the type instance created then ?

Clue : This is what i would like to call a 'Blackhole Riddle' ! One that sucks the answer right within the question ... Come on. Are you expecting more ?

The answer is pretty simple though once you think about it but it came as a huge blow to me when i saw the implementation of it while going through the Rotor souce. Anyone who has been even mildly curious about the internal working of the CLR can answer this. Pour in your answers.

I do have a request too. I was wondering whether is there any request based blog discussion somewhere in MSDN blogs ? I know Chris once had a Request a Topic blog post but other than that everyone seems to be interested in what's coming up in the future, Whidbey, Orcas and Longhorn. I will be happy if the leads at MS or anyone who knows the stuff can explain the bits, this riddle relates to and keep doing so until most of the low level principles are even superfluously covered ... Or if that is a very unreasonable request to ask then tell me why ?!