找不到“点"在System.Drawing中 [英] Can't find "Point" in System.Drawing

查看:51
本文介绍了找不到“点"在System.Drawing中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,存在于命名空间 System.Drawing 中,但是Visual Studio找不到它.

As I know, Point are exist in namespace System.Drawing, but Visual Studio can't find it.

using System.Drawing;
class Flower
{
    public Point Location { get; private set; }
}

错误:找不到类型或名称空间"Point"的名称

Error: Can't find name of type or namespace "Point"

修改1:.Net 4.5.1

Edit 1: .Net 4.5.1

推荐答案

在解决方案资源管理器中,在项目的 References 条目上单击鼠标右键,然后单击 Add Reference ...

Right click in Solution Explorer on your Project's References entry and click on Add Reference...

确保要在装配体->框架"下查找,然后找到并选中" System.Drawing "复选框,然后单击确定".

Make sure you're looking under Assemblies --> Framework, then find and check the checkbox for System.Drawing, then click OK.

从此处,您可以在代码中使用 System.Drawing.Point .

From here, you can useSystem.Drawing.Point in your code.

这篇关于找不到“点"在System.Drawing中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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