Blog LogoBlog Logo

Tag: refactoring

All tags

Code Review: Making a drop down list out of an enum

I’ve come across code like this a couple of times and it is rather odd: IEnumerable<CalendarViewEnum> _calendarViewEnums =...

— 20 Apr 2015

Tip of the day: Using the null-coalescing operator over the conditional operator

I’ve recently been refactoring a lot of code that used the conditional operator and looked something like this: int someValue =...

— 25 Jul 2011

Why should you be returning an IEnumerable

I've seen in many places where a method returns a List<T> (or IList<T> ) when it appears that it may not actually really be required, or even desirable when...

— 19 Jul 2011

The value of smaller methods

A while ago on a forum I advised someone that their method was too long and difficult to read and maintain. I suggested that they break the code into smaller...

— 30 Dec 2007