Stupid code of the day

posted by Jeff | Thursday, June 17, 2010, 10:16 AM | comments: 0

This was just too good (or bad) not to blog about. We found this gem today...

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", 
"CA1024:UsePropertiesWhereAppropriate")]
public static string GetSiteMapsKey()
{
    return "sm:all";
}

That's right... it's such a wrong thing to do, and they knew it, that they made it so no code analysis tool would catch it and warn them they were being stupid. Awesome.


Comments


Post your comment: