VSD2012-将委托添加到类设计器 [英] VSD2012 - Adding Delegates to Class Designer

查看:68
本文介绍了VSD2012-将委托添加到类设计器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好-可能是愚蠢的问题,但是我一直在MSDN和其他地方搜索答案,但无济于事.

Hi all - stupid question probably, but I've been searching MSDN and elsewhere for answers, to no avail.

我正在使用类设计器"构建一个类图,并且我想向该类图添加一个委托,并且一些MSDN文章都说这很容易.只需从工具箱的类设计器"下拖动一个委托即可.

I'm building a class diagram using the Class Designer, and I want to add a delegate to the class diagram, and several MSDN articles say it's pretty easy. Just drag a delegate from the toolbox, under "Class Designer".

唯一的问题是,没有代理可以从我看到的工具箱中拖动.我所能添加的只是接口,包,枚举,注释,类和各种关联连接器,根据我阅读的文章,我也应该能够 参见结构和代表,但没有.他们无处可寻.

The only problem is, there is no delegate to drag from the toolbox that I can see. All I can add are Interfaces, Packages, Enumerations, Comments, Classes,and various association connectors, when according the articles I've read, I should also be able to see structs & delegates, but no. They're nowhere to be found.

那么,有谁知道如何使代表显示在菜单中,或者失败了,通过其他方式将其显示在类图上?

So, does anyone know how get Delegates to show up in the menu, or failing that, some other way to get them onto a class diagram?

推荐答案

雅克,

听起来像是您看到的是  a  UML类图( diagramName .classdiagram)与vs.a ..NET类图( diagramName .cd)的工具箱.这是两个工具箱的外观:

Sounds like you're seeing the toolbox for a UML class diagram (diagramName.classdiagram) versus a .NET class diagram (diagramName.cd). Here's what the two toolboxes look like:

UML类图与语言无关,通常用于高级可视化.如果您使用的是C#,则可以 从C#代码创建UML类图.否则,您可以使用.NET类图. ;以可视化现有代码,但每个类图的范围仅限于一个项目.

UML class diagrams are language-agnostic and generally used for high-level visualization. If you're working in C#, you can create UML class diagrams from C# code. Otherwise, you can use .NET class diagrams to visualize existing code, but each class diagram is scoped to a single project.

我怀疑您找到了其中一篇与.NET类图有关的文章:

I suspect you found one of these articles, which is about .NET class diagrams:

如何:使用类设计器创建类型

因此,如果要基于现有代码创建一个类图,则需要一个.NET类图.右键单击您的项目,然后转到添加><b; 新项目> 类图.

So, if you want to create a class diagram that's based on your existing code, you'll need a .NET class diagram. Right-click your project, then go to AddNew Item > Class Diagram.


这篇关于VSD2012-将委托添加到类设计器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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