Current filter:
                                You should refresh the page.
                                  • The code cleanup rule for Make properties auto-implemented converts this code

                                    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

                                    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'

                                • Alex Z (DevExpress) 08.18.2016


                                  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.

                                1 Solution

                                Creation Date Importance Sort by


                                • John Szentes 08.29.2016

                                  The hotfix did not work correctly.  The About screen shows I have version v16.1.6.16242 after applying the hotfix.
                                  I ran cleanup on the same code as first posted and it still collapsed the readonly property, but this time the ReadOnly qualifer was removed producing the code shown below.
                                  This now compiles but it is not correct behavior.  The ReadOnly property should not have been collapsed and the backing private variable should not have been removed.

                                  Public Property Value As Integer Public Sub Test() Value = 1 End Sub
                                • Artem L (DevExpress) 08.29.2016

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

                                • John Szentes 08.29.2016

                                  That fixed it.  Thanks

                                • Artem L (DevExpress) 08.30.2016

                                  You are welcome.