使用类图创建枚举 [英] Creating enum using class diagram

查看:362
本文介绍了使用类图创建枚举的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我想知道您是否可以向我提供有关如何使用类图创建枚举的指导.我可以在代码中做到这一点.当我尝试使用类图进行操作时,枚举没有嵌套在我想要的类中,它本身就是嵌套的.如何使用类图将其绑定或嵌套在类中?


我正在使用Visual Studio10.我试图在某个类中创建枚举.有类图工具,并且有枚举,但是当我创建它时,我不知道如何使它成为类图中某个类的一部分.

如果我用代码创建枚举,则可以在类本身中创建枚举,但出于培训目的,我试图在类图中创建枚举.

Hey guys, was wondering if any of you could give me guidance on how to create a enum using the class diagram. Im fine doing it in code. When i try and do it using the class diagram, the enum is not nested in the class i want, its by itself. How do i bind or nest it in a class using the class diagram?


Im using Visual studio 10. Im trying to create the enum in a certain class. There is class diagram tools, and enum is there but when i create it i dont know how to make it part of a certain class in the class diagram.

If i create the enum in code its fine cause im creating the enum in the class itself, but for training purposes im trying to create the enum in the class diagram.

推荐答案

我确实认为您可以在绘制图表时做到这一点,而不是使用嵌套的Enum创建类并将该类拖到您的图表中.然后,如果您扩展类,则可以看到嵌套类型"部分.列出所有嵌套类型的位置.
I do think you can do it while drawing the diagrams, instead create the class with the nested Enum and drag the class into you diagram. Then if you expand the class, you can see a Nested types section. where all the nested types will be listed.


看看:
http://stackoverflow.com/questions/412944/uml-class-diagram-enum [ ^ ]
have a look at :
http://stackoverflow.com/questions/412944/uml-class-diagram-enum[^]


这篇关于使用类图创建枚举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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