Bug Report T416484
Visible to All Users

Code Cleanup - The 'Make properties auto-implemented' rule causes errors when used with ReadOnly properties in VB   

created 9 years ago

The code cleanup rule for Make properties auto-implemented converts this code

Visual Basic
Public Class Class1 Private _value As Integer Public ReadOnly Property Value As Integer Get Return _value End Get End Property Public Sub Test() _value = 1 End Sub End Class

and converts it to this

Visual Basic
Public Class Class1 Public ReadOnly Property Value As Integer Public Sub Test() Value = 1 End Sub End Class

which does not compile .  The assignment Value = 1 is highlighted with error  Property 'Value' is 'ReadOnly'

Comments (1)
DevExpress Support Team 9 years ago

    John,

    Thank you for the report. I agree with you that "Make properties auto-implemented" should not be available in this case.
    I have passed this ticket to our developers to fix this.

    Answers approved by DevExpress Support

    created 9 years ago (modified 8 years ago)

    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.

      Show previous comments (1)
      DevExpress Support Team 8 years ago

        Hi John,
        We have reviewed and corrected our fix, thank you.
        We prepared a build with our changes. You are welcome to try it:
        DevExpress.CodeRush.Roslyn-16.1.6.16242.vsix

          That fixed it.  Thanks

          DevExpress Support Team 8 years ago

            You are welcome.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.