says: "mastering the skills to maximize the tools"

Archive for the ‘Coder's Code’ Category

C# Generic Comparer

Thursday, April 17th, 2008 Posted in Coder's Code | No Comments »

This morning I ran into a situation where i need to sort an array of ServiceController before binding into a combobox. So I looked around and I found Array.Sort (or List.Sort). Tried with the parameter-less call, but .NET doesn't like ...

C# Generic Constraints

Friday, March 28th, 2008 Posted in Coder's Code | No Comments »

Generic is a new wonder in .NET with the flexiblity it introduces to coders. But when you wish to explore further, you might face the limitation of only able to work with Object capabilities. This is because generic doesn't know ...

Better comparison with enumeration

Tuesday, March 11th, 2008 Posted in Coder's Code | No Comments »

Suppose you have an enum list and a variable which value comes from external source. What do you usually do to compare against the enum list? If (MyValue == "3") { //3 means ok, do some stuff } What if one day ...

I Learned and Applied RegularExpression Today

Tuesday, January 29th, 2008 Posted in Coder's Code | No Comments »

Scenario: I have a number of patterns that I need to check and replace in a string. I don't want to transverse the string and play with characters and length. What other option I have?

I want the library FAST!

Monday, January 28th, 2008 Posted in Coder's Code | No Comments »

My MSDN 2008 Library didn't install a direct link to launch help like the 2005 version. So i tweaked the 2005 shortcut and hoila, i have the shortcut for 2008 version. You like the F1, but i prefer this so ...

coalescing null yield return

Saturday, January 26th, 2008 Posted in Coder's Code | 2 Comments »

Ok the title means nothing at all, and they are not related too, except that they both are of C# family. As requested by Klaw, i am going to blog about it so that we all learn :D Coalescing Null Operator You ...

Begin Invoke..End Invoke

Monday, January 21st, 2008 Posted in Coder's Code | No Comments »

First post in the category :D This group is mainly to share coding stuff that is out of layman term. If you are not programmer, stay away at all cost! :P Found this very easy to read yet informative post on ...