This question has already been answered:

Began to master the PLO. Suppose you need to return the X coordinate and the Y coordinate without using an array. Can this be done through double?

Reported as a duplicate by Grundy , rdorn , aleksandr barakin , VladD c # Nov 27 '16 at 11:03 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Wait for the next Sharp release))) - Qwertiy
  • if you are talking about OOP, then you should have a PointD class, in which there will be properties with the necessary coordinates. and taking into account the features of c #, it is better not a class, astukture - 4per
  • Or classes \ structures or Tuple or C # 7 or, khe-khe, dynamic and anonymous objects - Vladislav Khapin

1 answer 1

public static void GetXY(out double x, out double y) { x = 20; y = 10; } 

We use the method:

 double x; double y; GetXY(out x, out y); 
  • And for what a minus? It is a valid way. - VladD