Generating XML Serialization Assemblies

By Eric — 2 minute read

The .NET XML serialization support is pretty cool -- I've used it for a few projects now. It provides an easy way to convert objects with properties to and from XML. The implementation dynamically generates a serialization assembly to do this at runtime, so a recommended strategy for improving runtime performance …

Read more...

ArgumentException Creating an XmlSerializer

By Eric — 2 minute read

I ran into a kind of baffling problem. I've got some .NET code that is also accessible to Java via JNI. There are unit tests for the .NET code that all pass. To test the Java to .NET connection, I wrote a few JUnit tests which worked fine when run …

Read more...

Assembly Names

By Eric — 1 minute read

I always have a hard time keeping straight all the possible ways of getting an assembly's name and what form the various methods return. Here's a little program and its output for a reference.

class Program 
{ 
    static void Main(string[] args) 
    { 
        Assembly assembly = Assembly.GetExecutingAssembly(); 
        Console.WriteLine("Assembly.ToString()           : {0 …

Read more...

Getting an IStream on a File

By Eric

Getting a COM IStream instance on a normal file seems like something that should be trivial to do, but it always seems to take some hunting to remember how it is actually done.

There is a function in the shell API that will return an IStream on a file: SHCreateStreamOnFile …

Read more...

WordPress

By Eric — 3 minute read

After years of building this site with my own custom software, I've decided to switch to WordPress.

My previous system started with XHTML content transformed through various XSLT style sheets that produced summaries, an RSS feed, a Google sitemap, and a common appearance across all the pages. The whole process …

Read more...

InspectionPrinter - Prepare source code for inspection

By Eric — 3 minute read

InspectionPrinter is a utility to help get source code ready for a formal inspection.

Download

Install via "ClickOnce"
Version 1.1.2326.36040
15 May 2006
Around 1.7 MB

Inspection Printer depends on the Microsoft .NET Framework 2.0, which can be obtained through Windows Update.

Note: Installing the …

Read more...

Work Plan Editor - Maintain your personal schedule

By Eric — 2 minute read

Install via "ClickOnce" Version 3.0.2641.36770 25 Mar 2007 Around 300 KB

Work Plan Editor depends on the Microsoft .NET Framework 2.0, which can be obtained through Windows Update.

Note: Installing the software means that you agree to the license.

Note for ** Firefox ** users: You may need …

Read more...

Naming Private Fields (Addendum)

By Eric

This is just a quick addition to the previous posting, confirming the alleged use of m_ by Microsoft in their own code.

Lutz Roeder's .NET Reflector is a fascinating tool for various reasons, including its ability to show all the .NET Framework classes that use prefixes on member variables. There …

Read more...

Naming Private Fields

By Eric — 5 minute read

One of the greatest questions facing theologists is this: What should be the naming convention for private fields? The most controversial aspect is the use of m_ as a prefix.

For many programmers, this debate has been resolved for years. My personal history with the issue is goes like this …

Read more...

Remote Debugging

By Eric — 3 minute read

"It works on my machine" is not a very solid defense. And when something baffling is happening in your code on a non-development machine, and logging doesn't give enough clues, it can be a good time to take advantage of remote debugging.

In the past I've equated remote debugging to …

Read more...