-2
I want to assign these 4 variables to the switch case however when I will determine the case with the 4 variables it does not accept, says: CS0029 Cannot implicitly convert "bool" type to "(double X1, double Y1, double x2, double Y2)" Calculate distances
public class calculo
{
public void calcular(double x1, double y1, double x2, double y2)
{
switch(x1, y1, x2, y2)
{
case x1 == x2 && y1 != y2:
break;
}
}
}
Thank you very much, but would I have some command similar to the switch that does what I want? .
– Pedro Henrique Diniz Vieira
does not have, but can use if/Else if and keep adding conditions
– Ricardo Pontual