ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Convert constructor into member initializers

Last modified: 04 June 2024

When you have a parameterless constructor that only initializes properties, you can get rid of the constructor and initialize the properties at their declaration points. This simplifies the code and makes it easier to see the initial values for properties at a glance.