Advertisement
vedranvinko

sort of named tuple

Jun 22nd, 2016
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1. public class Point : Tuple<int, int>
  2. {
  3.     public Point(int x, int y) : base(x, y) {}
  4.  
  5.     public int x { get { return this.Item1; } }
  6.     public int y { get { return this.Item2; } }
  7. }
  8.  
  9. /*
  10.  * Point p = new Point(10, 20);
  11.  * Console.WriteLine(p.x);
  12.  */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement