How to reference system.drawing in Visual Studio 2010 Express?

时光毁灭记忆、已成空白 提交于 2020-01-03 19:16:18

问题


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

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

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.


回答1:


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".

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...)



来源:https://stackoverflow.com/questions/9450251/how-to-reference-system-drawing-in-visual-studio-2010-express

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!