如何在Visual Studio 2010 Express中引用system.drawing? [英] How to reference system.drawing in Visual Studio 2010 Express?

查看:97
本文介绍了如何在Visual Studio 2010 Express中引用system.drawing?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对此有些陌生,给人的印象是,要绘制自己创建的矩形,需要使用system.drawing.graphics.问题是,我得到了错误

I'm somewhat new to this and I am under the impression that to draw a rectangle that I've created, I need to use system.drawing.graphics. Thing is, I get the error

类型或名称空间名称'drawing'在名称空间'System'中不存在(您是否缺少程序集引用?)"

"The type or namespace name 'drawing' does not exist in the namespace 'System' (are you missing an assembly reference?)"

,当我右键单击解决方案资源管理器中的引用"文件夹时,找不到system.drawing.因此,我不确定如何在绘制矩形时继续前进.

and when I right click the References folder in the solution explorer, system.drawing is nowhere to be found. So I'm not exactly sure how to move forward in drawing a rectangle.

推荐答案

无论VS2010的版本如何,名称空间都应该可用.右键单击参考",添加参考...",.NET"选项卡,按组件名称排序,然后选择"System.Drawing"和确定".

Namespace should be available to you no matter the version of VS2010. Right click "References", "Add Reference...", ".NET" tab, sort by component name and select "System.Drawing" and "OK".

如果未显示,则您可能需要查看项目的构建属性,并查看要定位的框架(2.0、3.5、4.0等...)

If it doesn't show then you might want to look into your build properties on your project and see what framework you're targeting (2.0, 3.5, 4.0, etc...)

这篇关于如何在Visual Studio 2010 Express中引用system.drawing?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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