diff options
Diffstat (limited to 'csharp.html.markdown')
| -rw-r--r-- | csharp.html.markdown | 28 | 
1 files changed, 25 insertions, 3 deletions
| diff --git a/csharp.html.markdown b/csharp.html.markdown index cca99fb0..963f38f4 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -593,7 +593,7 @@ on a new line! ""Wow!"", the masses cried";                  Console.WriteLine(bikeSummary.Name);              // ASPARALLEL -            // And this is where things get wicked - combines linq and parallel operations +            // And this is where things get wicked - combine linq and parallel operations              var threeWheelers = bikes.AsParallel().Where(b => b.Wheels == 3).Select(b => b.Name);              // this will happen in parallel! Threads will automagically be spun up and the              // results divvied amongst them! Amazing for large datasets when you have lots of @@ -613,7 +613,7 @@ on a new line! ""Wow!"", the masses cried";                  .ThenBy(b => b.Name)                  .Select(b => b.Name); // still no query run -            // Now the query runs, but opens a reader, so only populates are you iterate through +            // Now the query runs, but opens a reader, so only populates as you iterate through              foreach (string bike in query)                  Console.WriteLine(result); @@ -711,7 +711,7 @@ on a new line! ""Wow!"", the masses cried";          // Before .NET 4: (aBike.Accessories & Bicycle.BikeAccessories.Bell) == Bicycle.BikeAccessories.Bell          public BikeAccessories Accessories { get; set; } -        // Static members belong to the type itself rather then specific object. +        // Static members belong to the type itself rather than specific object.          // You can access them without a reference to any object:          // Console.WriteLine("Bicycles created: " + Bicycle.bicyclesCreated);          public static int BicyclesCreated { get; set; } @@ -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 | 
