我对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坐标吗?