SkySurfer
SkySurfer

Reputation: 521

Is there a way to generate all public members object initializer in vs code?

I'm looking for behaviour similiar to JB Rider. When contructing object through initializer there's an option to generate all public property assignments. Is there a way to add this feature to vs code?

Upvotes: 1

Views: 53

Answers (1)

NPras
NPras

Reputation: 4115

The Roslynator.Refactorings NuGet package has an "Add All Properties to Initializer" action. It's not as polished as the R#/Rider one, but does the job pretty well.

On top of Refactorings, the whole Roslynator project also has hundreds of Analyzers and CodeFixes that I found useful after ditching R#.

Upvotes: 1

Related Questions