Code generation using .net
.net, c#, code-generation, vb.net
Solution
See the System.CodeDom namespace. Basically you use CodeDom to create an abstract model of the class. Then you instantiate a CSharpCodeProvider or VBCodeProvider and use one of the CodeDomProvider.GenerateCodeFrom... methods to emit it as the appropriate kind of source code. This is the underlying technology used by the Windows Forms Designer, xsd.exe, etc.
Be warned, however, that CodeDom is quite verbose and fiddly to work with. If your classes a moderately complex, you may want to use a templating engine such as T4 or NVelocity instead.
Problem
are there any classes in the .net framework that allow me to generate classes that i can save as .cs or .vb files ?