How can I prevent property names in class diagrams from being sorted?

徘徊边缘 提交于 2019-12-10 01:10:00

问题


I tend to design my classes with properties sorted in an order that makes sense to me. For example; I always make critical info like 'id' near the beginning, followed by less & less important data, and finally record meta data like 'create date' near the end.

But when I add the class to Visual Studio's (2010) class diagram, it sorts the properties alphabetically. Is there anyway to turn this functionality off?

Edit (11/05/11):

For example, I have the following class

public class Email
{
    public Int64 Id { get; set; }
    public Int64 UserId { get; set; }
    public string Name { get; set; }
    public string EmailAddress { get; set; }
    public DateTime CreateDate { get; set; }
    public DateTime UpdateDate { get; set; }
}

But when I add it to my diagram, it displays properties in the following order:

CreateDate
EmailAddress
Id
Name
UpdateDate
UserId

Instead of the order I expect

Id
UserId
Name
EmailAddress
CreateDate
UpdateDate

回答1:


Is this what you're looking for? http://msdn.microsoft.com/en-us/library/8tkebx17.aspx



来源:https://stackoverflow.com/questions/7911385/how-can-i-prevent-property-names-in-class-diagrams-from-being-sorted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!