summaryrefslogtreecommitdiffhomepage
path: root/csharp.html.markdown
diff options
context:
space:
mode:
authorPratik Karki <predatoramigo@gmail.com>2017-08-25 15:37:06 +0545
committerGitHub <noreply@github.com>2017-08-25 15:37:06 +0545
commit8f1586960f78e6ec92848cadd32bcb888aaea781 (patch)
treebc9e7277cd973c58ce94fbd0d769c44114b4cc6f /csharp.html.markdown
parent4004e7b35d816e8b184fda68c98a0ab1df39f3fd (diff)
parent4ee29d1c256c7587457469da2415ed8997e983e5 (diff)
Merge pull request #2823 from ravinderjangra/NewLocalBranch
[csharp/en] C# 7 Feature Tuple
Diffstat (limited to 'csharp.html.markdown')
-rw-r--r--csharp.html.markdown22
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