我需要为这行代码做些什么?(C#)

0 c# class

我试图得到一个if语句,说明我的点数组在"i"(在For循环中初始化)是否等于Circle的X和Y(设置为smallcircle.X和smallcircle.Y).我知道在if语句中我需要做什么,但我不能让if语句本身起作用.那是什么语法?

目前有:

if (centerPoints[i] == smallcircle.X, smallcircle.Y)
Run Code Online (Sandbox Code Playgroud)

它不喜欢那一点.

Ric*_*dle 11

可能是这样的:

if (centerPoints[i].X == smallcircle.X && centerPoints[i].Y == smallcircle.Y)
Run Code Online (Sandbox Code Playgroud)