C#7 features

John via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon May 9 05:46:28 PDT 2016


On Monday, 9 May 2016 at 00:44:09 UTC, Peter Häggman wrote:
> Their tuples seem to be a complete DIY:
>
> https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx

C# 7's tuples are something different though. They don't even map 
to System.Tuple. The syntax is:

   (int x, int y) GetPoint() {
     return (500, 400);
   }

   var p = GetPoint();
   Console.WriteLine($"{p.x}, {p.y}");


More information about the Digitalmars-d-announce mailing list