I have a method that returns an object to me
public CPunto PuntoMedio(CPunto a, CPunto b)
{
int xm = (a.x + b.x) / 2;
int ym = (a.y + b.y) / 2;
return new CPunto(xm, ym);
}
My question is how to receive that Return here where I want to use it
if (radbutpm.Checked)
{
CPunto PM;
PM = new CPunto(PT.PuntoMedio(LPuntos[posi1], LPuntos[posi2]));
txtresult.Text = Convert.ToString(PM);
}