A perplexing error while setting up my new system: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the “Refresh” button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be […]
Category Archives: annoying
Tightly coupled systems are unmaintainable
Thursday, February 8, 2007
Yet another example of why I believe this: Microsoft told me to update to IE7, so I did. To test something in IE6, I’m installing MS Virtual PC 2004 (provided free by MS), and running an image of Windows XP that has IE6 (also provided free by MS). I am following this article from the […]
Ease Parsing enums in C# using generics
Friday, November 17, 2006
Once constant annoyance I’ve had with C# has been parsing a string into an enum. Original C#: MyEnum e = (MyEnum) Enum.Parse(typeof(MyEnum), “myvalue”); Using generics let you write a function to help: public static T ParseEnum<T>(string name) { return (T)Enum.Parse(typeof(T), name); } So then you can simply* say: MyEnum e = ParseEnum<MyEnum>(“myvalue”); A little nicer, […]