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?
You need to add an AccessorList
, with accessors. Check out this online tool for the exact syntax tree creation: Roslyn Quoter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With