VS .NET 类设计器
假设Being 类具有Habitat 类型的属性。这两个类都在自己的 .cs 文件中实现。当我将两个类从类设计器拖放到新的类图上时,我没有看到从 Being 到 Habitat 的关联线,但在代码中存在关联。我做错了什么,或者这根本没有在 VS 中实现?
Assume that class Being has a property of type Habitat. Both classes are implemented in their own .cs files. When I drag and drop the two classes from the class designer onto a new Class diagram, I do not see an association line from Being to Habitat, whereas there is an association in code. Am I doing something wrong, or this simply isn't implemented in VS yet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
要显示属性连接,请右键单击该属性; “显示为关联”或“显示为集合关联”(视情况而定)
To show the property connection, right-click on the property; "show as association" or "show as collection association" (as appropriate)
默认情况下它是关闭的。右键单击该属性并选择“显示为关联”
It's off by default. Right click on the property and choose "Show as association"
类图不显示类型的每个实例(属性)及其类型之间的“线”。这很快就会变得非常非常混乱。
如果“Being”源自“Habitat”(这没有意义),那么它会显示一条线。它显示继承行,而不是每个单独的字段/属性。
The class diagram doesn't show "lines" between every instance (property) of a type and its type. This would get very, very messy very quickly.
If "Being" derived from "Habitat" (which wouldn't make sense), it would show a line for that. It shows lines for inheritance, not each individual field/property.
栖息地是存在的财产。它们并不像设计师所展示的那样关联。设计师彰显传承。
Habitat is a property in Being. They are not associated in the way the designer shows. The designer shows inheritance.