有没有办法让+操作员为Point对象工作?
举个例子,这个小片段:
this.cm1.Show((MouseEventArgs)e.Location+this.i_rendered.Location);
Run Code Online (Sandbox Code Playgroud)
你看,我试着给彼此增加两点.它只是不起作用(这是预期的).我很乐意让这个工作.
有任何想法吗?
可能重复:
如何在向两个点添加两个点的同时使+运算符工作?
我的代码
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)
我怎样才能解决这个问题?