Merge pull request #2823 from ravinderjangra/NewLocalBranch

[csharp/en] C# 7 Feature Tuple
This commit is contained in:
Pratik Karki 2017-08-25 15:37:06 +05:45 committed by GitHub
commit 8f1586960f

View File

@ -1095,6 +1095,28 @@ namespace Learning.More.CSharp
} }
} }
} }
using System;
namespace Csharp7
{
//New C# 7 Feature
//Install Microsoft.Net.Compilers Latest from Nuget
//Install System.ValueTuple Latest from Nuget
class Program
{
static void Main(string[] args)
{
//Type 1 Declaration
(string FirstName, string LastName) names1 = ("Peter", "Parker");
Console.WriteLine(names1.FirstName);
//Type 2 Declaration
var names2 = (First:"Peter", Last:"Parker");
Console.WriteLine(names2.Last);
}
}
}
``` ```
## Topics Not Covered ## Topics Not Covered