Contents tagged with .NET
-
Not-So-Lazy Static Constructors in C# 4.0
A coworker pointed me towards an interesting blog post by John Skeet about the changed behavior of static constructors in C# 4.0 (yes, I know, it’s been a few years now, but I never ran into it). It … more
-
Remote Debugging through fire, snow or fog
Remote Debugging in Visual Studio is a wonderful feature, especially during the later stages of testing and deployment, and even (if all else fails) when in production, but getting it to work is … more
-
The Case of the Unexpected Expected Exception
“NUnit is being problematic again”, they told me when I came to visit the project. “When running unattended it’s not catching assertions properly and the test is coming up green, but when stepping … more
-
Tales from the Unmanaged Side – System.String –> char* (pt. 2)
A while ago, I posted an entry about marshalling a managed System.String into an unmanaged C string, specifically a plain char*. The solution I suggested, back in 2007, involved calling Marshal:: … more
-
Static Constructor throws the same exception again and again
Here’s a little gotcha I ran into today – if you have code in a class’s static constructor that throws an exception, we will get a TypeInitializationException with the original exception as the … more
-
Upgrading all projects to .NET 3.5
A simple macro to change the Target Framework for a project from .NET 2.0 to .NET 3.5, hacked together in a few minutes. This will fail for C++/CLI projects, and possibly VB.NET projects (haven't … more
-
Any signs of life for the SharePoint Extensions for Visual Studio?
Has anything been released - or, in fact, talked about - since August's release of the v1.1 CTP? Haven't done any web-part development in a while and wanted to get back in the game. I last used the … more
-
Seeking advice - strong names and config files
I'll use my blog for a bit of fishing for advice and guidance on an issue that's been bugging me. We've been moving towards using strong names on all of our assemblies. The benefits are obvious, and … more
-
System.Diagnostics.EventLogEntry and the non-equal Equals.
Just a quick heads-up in case you're stumped with this problem, or just passing by: The System.Diagnostics.EventLogEntry class implements the Equals method to check if two entries are identical, even … more
-
Displaying live log file contents
I'm writing some benchmarking code, which involves a Console application calling a COM+ hosted process and measuring performance. I want to constantly display results on my active console, but since … more