When I press CTRL + . on a constructor parameter and use the Declare → Declare Field with Initializer I would expect the field to be created as readonly. Is the current behavior by design or is it a bug?
Code Providers - 'Declare Field with Initializer' should declare a read-only field when called in the constructor
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v17.1.5Download Official Update
Hi Dominic,
Thank you for pointing out this issue. We agree that creating a read-only field will be more suitable for a constructor parameter. We will correct the 'Declare Field with Initializer' behavior in this case.