Reputation: 2309
I'm creating a tool which can create properties through Roslyn. I would like to add getter and setters to a PropertyDeclarationSyntax
.
How can I do this?
Upvotes: 4
Views: 894
Reputation: 6420
You need to add an AccessorList
, with accessors. Check out this online tool for the exact syntax tree creation: Roslyn Quoter.
Upvotes: 7