DCSIMG
C#,DEV - Stiller's Blog

Stiller's Blog

Software Challenges - Arise!

Browse by Tags

All Tags » C# » DEV (RSS)
Invoking the Static Constructor via Reflection
-- Warning! -- This post may cause the reader a slight feeling of nausea. However, remember that tough situations call for some tough actions! The Situation Imagine that you have to write some-unit tests for a class which uses an existing infrastructure, involving calls to static methods on a static class. To make things worse, this static class also holds some state which, unfortunately, gets carried around between tests without no actual ability to clear it. public static class MyInfrastructureClass...
PDC 2009 Day 1: Future Directions for C# and Visual Basic
I attended the PDC breakout session named “Future Directions for C# and Visual Basic” given by Luca Bolognese, the Languages Group Program Manager. This session presented both features that exist in Visual Studio 2010 and features that would be added in future releases, however on my post I’ll concentrate on the new future directions. Compiler as a Service An interesting direction the Languages Group is taking is opening up the C# and VB compilers to custom extensions. An example of utilizing this...