FYI: I beleive there will be something similar in Visual Studio 2005 (due in Nov)

The System.CodeDom and Microsoft.VisualBasic.VBCodeProvider/VBCodeGenerator, (and the C# versions) will probably come in handy.

Currently CodeDom only supports writing code, and not parsing it, Interpreting already generated classes will be a pain...