This tutorial will show you how you can use NRefactory to parse C# code, modify the abstract syntax tree and generate C# code.
NRefactory.wmv (5.8MB, 13:17 m)
You can download the example code here: NRefactoryExample.zip (7,15 KB)
If you don't have SharpDevelop installed in C:\Program files\SharpDevelop\2.0, you will need to remove the reference to NRefactory from the project and add it with the correct location.