Monthly Archives: January 2011

Extending C# Enumerators with Methods

Although I personally find C# enumerators to be atrocious, they still have several advantages over constant integers.  One of these advantages is the ability to extend the object with additional logic.  This is accomplished by binding extension methods at compile … Continue reading

Posted in C# | Tagged , , | Leave a comment

Generic Singleton Pattern in C# with Reflection

Reusable and proven design patterns are crucial to building robust and scalable applications.  I loathe copying and pasting boilerplate code; naturally, I always prefer abstract classes and interfaces when possible.  And frequently, I end up employing a singleton pattern when … Continue reading

Posted in C# | Tagged , , , | 1 Comment

CSS Browser Selector

One of the most time consuming activities during web development is ensuring cross-browser compatibility.   However rare, it is sometimes necessary to write CSS rules that target only a specific browser.  Not to mention, there are any number of other … Continue reading

Posted in CSS, Javascript | Tagged , , , | 2 Comments

Cross-Browser XPath

Although the popularization of JSON in recent years has decreased the use of XML as the mode of data delivery for new web applications, many services and developers still rely upon the passé format. When writing code in any case–short … Continue reading

Posted in Javascript | Tagged , , | 1 Comment

Alternating Table Row Colors

Over the years I’ve used a number of different methods to paint alternating rows in a table with different background colors.  Rather than using some inelegant scripting approach or, god forbid, writing them manually, there is a succinct CSS solution. … Continue reading

Posted in CSS, HTML | Tagged , , , | Leave a comment