roslynChange source code with Roslyn


Introduction

Practical examples of using Roslyn for source code transformations.

Remarks

  • Roslyn syntax trees are immutable. By calling a method like ReplaceNodes we generate a new node rather than modifying the existing one. This requires you to always change the object you have been working on.