If (picturebox1.location = [closed]
I'm just learning C# and have a question.
i need something like this.
if (pictureBox1.Location 开发者_运维技巧= 177, 523)
{
....
}
how can i do this?
The Location property is of type Point. You'll need
if (pictureBox1.Location == new Point(177, 523)) { ... }
or
if (pictureBox1.Left == 177 && pictureBox1.Top == 523) { ... }
Try using the picturebox1.Left
and picturebox1.Top
properties rather than the .Location
.
精彩评论