Ticket T1137907
Visible to All Users

Organize Members Wrong Order

created 2 years ago

Goal: the goal is to organize this more complex c# class file in the order i want it to.
I am calling to organize members and it is organizing in a different than expected way. I have attached my settings using the class below as an example, and i think i have something configured wrong or its broken.
Starting example:

C#
using System; using System.IO; namespace mine; public class yoi { private long _nice; public long Nice { get => _nice; set => _nice = value; } [Obsolete] public int Best { get; set; } public yoi() { Console.WriteLine("hi");} public void MyMethod() { Console.WriteLine("Bye"); } [Obsolete] private string Me { get; set; } internal delegate string SecretDell(string me); protected StringReader _myReader = new("cool"); }

What happened after organization:

C#
using System; using System.IO; namespace mine; public class yoi { private long _nice; [Obsolete] private string Me { get; set; } protected StringReader _myReader = new("cool"); internal delegate string SecretDell(string me); public yoi() { Console.WriteLine("hi"); } public void MyMethod() { Console.WriteLine("Bye"); } public long Nice { get => _nice; set => _nice = value; } [Obsolete] public int Best { get; set; } }

expected result:

C#
using System; using System.IO; namespace mine; public class yoi { protected StringReader _myReader = new("cool"); private long _nice; internal delegate string SecretDell(string me); public yoi() { Console.WriteLine("hi"); } public void MyMethod() { Console.WriteLine("Bye"); } [Obsolete] public int Best { get; set; } [Obsolete] private string Me { get; set; } public long Nice { get => _nice; set => _nice = value; } }

Any help is appreciated

Answers approved by DevExpress Support

created 2 years ago

Hi,

Thank you for your settings. I made a few corrections for you:

  1. There is an unnecessary "Members" group which causes all the trouble, as basically everything falls into this group, and as a result nothing is grouped according to your other groups. I removed this "Members" group;
  2. I changed sorting by visibility to Descending for each grouping rule, so that public members go first and private members go last;
  3. I disabled the "Insert an empty line above and below all organized members" checkbox;

You can find your updated settings attached here. Let me know if this helps

    Comments (2)

      My Support and Savior! lol

      Thank you! I didn't realize what members were specifically, so i just thought they were everything else that wasn't covered/specified in the other groups. I see, it does work as how i intended now. Headache has gotten better since :D

      PW PW
      Przemyslaw Wlodarczak (DevExpress) 2 years ago

        Hi,

        Basically, everything falls into the "Members" group. If it was the last group in the list, it should work as you described - everything that wasn't covered by all the previous groups should fall here. Groups are calculated from top to bottom, and their order matters.
        I am happy to hear everything works for you now :)

        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.