如何防止对类图中的属性名称进行排序? [英] How can I prevent property names in class diagrams from being sorted?

查看:82
本文介绍了如何防止对类图中的属性名称进行排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我倾向于使用对我有意义的顺序对属性进行排序来设计类。例如;我总是在开始时输入诸如 id之类的关键信息,其次是&不太重要的数据,最后在末尾记录创建日期之类的元数据。

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.

但是当我将类添加到Visual Studio的(2010)类图中时,它会进行排序属性按字母顺序排列。反正可以关闭此功能吗?

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?

编辑(11/05/11):

Edit (11/05/11):

例如,我有以下课程

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

代替我期望的顺序

Id
UserId
Name
EmailAddress
CreateDate
UpdateDate


推荐答案

这是您要找的东西吗? http://msdn.microsoft.com/en-us/library/8tkebx17.aspx

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

这篇关于如何防止对类图中的属性名称进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆