第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > c# point偏移_C#中的Point类

c# point偏移_C#中的Point类

时间:2024-06-25 18:47:27

相关推荐

c# point偏移_C#中的Point类

我对C#很陌生,我正在努力做一些事,但没有太大的成功.我正在尝试使用Point类(带坐标的那个).

这是代码:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace app2{

class Program{

static void Main(string[] args){

Point p1 = new Point();

p1.X = 7;

p1.Y = 6;

Console.WriteLine(p1.X);

Console.WriteLine(p1.Y);

Console.ReadLine();

}

}

}

错误是:

The type or namespace Point could not be found

我一直在Java中以非常类似的方式使用这个类,我应该声明我自己的Point类/函数返回X和Y坐标吗?

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。