Current filter:
                                You should refresh the page.
                                  • Given a method that looks like this:

                                    [C#]
                                    namespace MyNamespace { public class TestClass { public void DoWork() { } public TestClass() { } private Lazy<Guid> _id = new Lazy<Guid>(() => Guid.NewGuid()); } }

                                    And the Organize Members settings are set to "StyleCop"
                                    When you execute Organize Members the Lazy<Guid> _id field should get moved to the top of the class but instead it stays at the bottom. Even if you manually put it at the top, after Organize Members runs it gets put back at the bottom incorrectly.

                                    It appears the field is getting sorted like a private method rather than a private field.

                                • Travis Illig (FISV) 03.21.2016

                                  This also seems to affect static readonly fields. For example, this field will get sorted to the bottom of the class, too:

                                  public static readonly string SomeName = "SomeValue";

                                • Alex X (DevExpress) 03.22.2016

                                  Hi Travis,

                                  Thank you for letting us know about this problem. I have reproduced this behavior locally and will pass this ticket to our developers for further research.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed:

                                We have fixed this problem and will include it in an upcoming release. The final release date has not been set, but once it is published we will send you an automatic notification.

                                Additional information:

                                Hi Travis,
                                Initialized fields weren't touched by Organize Members (and moved to the end of  class) because of possible side effects. However, in most cases, this check is not necessary. In CRR 1.0.11, we have introduced an option - 'Skip initialized fields'. If you uncheck it, initialized fields will be organized as any other members. We plan to release CRR 1.0.11 shortly.