Templates are patterns for generated code. CodeSmith Generator comes with a set of useful templates to get you started. You can also download more templates from our CodeSmith Community Site as well as share them.

You might find that as you work with CodeSmith Generator, you'll start to develop your own custom templates. Template Explorer makes it easy to generator a template quickly as well as organize templates in folders so you can quickly find the template you are looking for. 

 

To open a folder, click on the arrow sign to the left of a specific folder to see the list of templates stored in the folder.

The .cst file extension stands for "CodeSmith Generator Template." You can probably guess from the names what the various templates do. For example, the HashTable.cst template, which can be found in the Other\Collections\Advanced folder, generates C# code for a hash table class. To open this template, just Double-click the template or right-click the template and select the Execute menu item.

Next: Setting Properties