Description
The Order
property specifies the display order of a member within the MemberDescription
class. This order is typically determined by the [Order]
attribute applied to the member. It is an integer value that can be used to sort or arrange members in a specific sequence.
Usage
Use the Order
property to retrieve or set the display order of a member. This can be particularly useful when you need to present members in a specific order in a user interface or when processing them in a defined sequence.
Example
// Example of accessing the Order property
MemberDescription memberDescription = new MemberDescription();
int displayOrder = memberDescription.Order;
// Set a new order
memberDescription.Order = 5;
// Use the order to sort members
List<MemberDescription> members = GetMembers();
members.Sort((a, b) => a.Order.CompareTo(b.Order));