Advertisement
BurningBunny

The future of C#

Feb 12th, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.20 KB | None | 0 0
  1. using System.Math;
  2.  
  3. public class Point(int x, int y)
  4. {  
  5.     public int X { get; } = x;
  6.     public int Y { get; } = y;
  7.    
  8.     public Point Move(int dx, int dy)
  9.     {
  10.         return new Point (X + dx, Y + dy );
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement