|
by skeet via Jon Skeet: Coding Blog on 12/9/2009 6:04:47 PM
Warning: here be dragons. I don't think this is the right way to check for null arguments, but it was an intriguing idea. Today on Stack Overflow, I answered a question about checking null arguments. The questioner was already using an extension similar to my own one in MiscUtil, allowing code like this: public void DoSomething(string name) { name.ThrowIfNull("name"); // Normal code here } That's all very well,
... [ read more ]
|
|