diff options
author | Pratik Karki <predatoramigo@gmail.com> | 2017-08-25 15:37:06 +0545 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 15:37:06 +0545 |
commit | 8f1586960f78e6ec92848cadd32bcb888aaea781 (patch) | |
tree | bc9e7277cd973c58ce94fbd0d769c44114b4cc6f | |
parent | 4004e7b35d816e8b184fda68c98a0ab1df39f3fd (diff) | |
parent | 4ee29d1c256c7587457469da2415ed8997e983e5 (diff) |
Merge pull request #2823 from ravinderjangra/NewLocalBranch
[csharp/en] C# 7 Feature Tuple
-rw-r--r-- | csharp.html.markdown | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/csharp.html.markdown b/csharp.html.markdown index 78f9db34..963f38f4 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -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 |