相关疑难解决方法(0)

如何让+运算符在相互添加两个点的同时工作?

有没有办法让+操作员为Point对象工作?

举个例子,这个小片段:

this.cm1.Show((MouseEventArgs)e.Location+this.i_rendered.Location);
Run Code Online (Sandbox Code Playgroud)

你看,我试着给彼此增加两点.它只是不起作用(这是预期的).我很乐意让这个工作.

有任何想法吗?

.net c# point operators winforms

6
推荐指数
2
解决办法
6916
查看次数

System.Drawing.Point运算符错误

可能重复:
如何在向两个点添加两个点的同时使+运算符工作?

我的代码

position.Location = (e.Location + pic1.Location) - bild_posi.Location;
Run Code Online (Sandbox Code Playgroud)

错误如:

the operator "+" isnt compatible with "System.Drawing.Point + System.Drawing.Point"
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

c# location operators picturebox

0
推荐指数
1
解决办法
1136
查看次数

标签 统计

c# ×2

operators ×2

.net ×1

location ×1

picturebox ×1

point ×1

winforms ×1