Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
This chapter is from the book

Generating a Simple Class

This chapter has demonstrated a complete—though simple—code-generation solution. Principally, this solution hasn't dealt with having multiple config files open at the same time, and I've deliberately restricted the objects I've used to keep the toolkit required for understanding this chapter small. I've also assumed that the generated code will always be in C#. (Although, because the solution generates so little code, extending it to handle Visual Basic—or any other language—would be very simple.) I also haven't spent much time on structuring code—the focus of the project is to concentrate on the code-generation process. The case study in the next chapter goes beyond this solution to handle multiple documents, using a larger toolkit, generating more complex code, and supporting both C# and Visual Basic through the CodeDom.

You can download the code for this case study from my website (www.phvis.com) and www.informit.com.

  • + Share This
  • 🔖 Save To Your Account