Alex Blogs Too

MHO (My Humble Opinion) about everything.

Wednesday, April 26, 2006

The magic I've found about System.Enum

Have you ever needed to write a method that will receive a value of any enumeration type ?
Well .. I had .

I also had to retrieve the int value that stands for the value that was passed .

So this is how I did that :

public void GetAnyEnumAndDoStuff(System.Enum AnyEnum)
{
  int iMyValue;
  iMyValue = (int)Enum.Parse(AnyEnum.GetType(),AnyEnum.ToString())
}

Thursday, April 20, 2006

It's finally here !!! The Google Calendar !

Really great job .
Go try it now !

Monday, April 17, 2006

Microsoft codenames

Nice to know..
I wonder .. do they actually have elections for those , or there is someone that decides on that , or maybe they wrote the "Product Names Generator" ?

You think they have a whole position dedicated to this ? :)