CSharpFeeds - All your C# feeds in one place.

Wednesday, December 09, 2009

"Magic" null argument testing

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 ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us