
Visual Studio ‘15’ Preview 3 for C# and Visual Basic - kristianp
https://blogs.msdn.microsoft.com/dotnet/2016/07/13/visual-studio-15-preview-3-for-c-and-visual-basic/
======
kristianp
I like the look of the new tuple syntax (although I would call it multiple
return values). From the article:

    
    
        (int sum, int count) Tally(object[] values)
        {
            var r = (s: 0, c: 0);
            foreach (var v in values)
            {
                switch(v)
                {
                    case int i:
                        r = (r.s + i, r.c + 1);
                        break;
                    case object[] l:
                        var n = Tally(l);
                        r = (r.s + n.sum, r.c + n.count);
                        break; 
                }   
            }
            return r;
        }
        
        object[] numbers = { 0b1, 0b10, 0b100, new object[] { 0b100, 0b1_0000 }, 0b10_0000 };
        var t = Tally(numbers);
        WriteLine($"Sum: {t.sum}, count: {t.count}");

