How to add white space and/or format code?

前端 未结 2 391
暗喜
暗喜 2020-12-17 16:47

Given that I have created a symbol using SymbolFactory.CreateProperty, how would I add white space. Currently I get accessibility, modifiers, name, type etc. all stringed to

2条回答
  •  独厮守ぢ
    2020-12-17 17:49

    I had the same issue, and I found this to work the best:

    node.WithTrailingTrivia(SyntaxFactory.Space)
    

    where node is a SyntaxToken of any kind.

提交回复
热议问题