vedranvinko icon

sort of named tuple

vedranvinko | PRO | 06/22/16 11:26:02 AM UTC | 0 ⭐ | 530 👁️ | Never ⏰ | []
C# |

250 B

|

None

|

0 👍

/

0 👎

public class Point : Tuple<int, int>
{
    public Point(int x, int y) : base(x, y) {}
 
    public int x { get { return this.Item1; } }
    public int y { get { return this.Item2; } }
}
 
/*
 * Point p = new Point(10, 20);
 * Console.WriteLine(p.x);
 */

Comments