-2

In CTP version, I used to write below code to save the changes to file with the formatting. Any idea what is changed in RTM?

 IEnumerable<IFormattingRule> rules =  FormattingRules.GetDefaultRules("C#");
            File.WriteAllText(
                filePath,
                modifiedTree.Format(FormattingOptions.GetDefaultOptions(), rules).GetFormattedRoot().ToFullString());
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
Pratik Mehta
  • 1,310
  • 4
  • 15
  • 37

1 Answers1

1

You probably want Formatter.Format.

Jason Malinowski
  • 18,148
  • 1
  • 38
  • 55