Head.SmackOnTable();

Contains Nuts.

Archive for the ‘simplicity’ tag

Consider if you actually need a variable…

without comments

Take this scenario, you need to call a function, so you do the following:

I basically needed to call GetCustomAttribute(true) (if you know a better way to check custom attributes, please let me know!). But then I had an epiphany. Do I really need the trace and frame objects, or can I just do the following:

Which does exactly the same thing, but is shorter, and is easier to read and follow!

I love simplicitiy.

Written by Monty

June 16th, 2008 at 6:08 pm

Posted in .NET

Tagged with , , ,