Method Returns Object, How to Receive it

0

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);
                    }
    
asked by Yair P. 03.10.2018 в 19:35
source

0 answers