2017-02-05



alvinashcraft
shared this story
from Weekly C# Digest.

sponsor

Be More Productive with Git

#git, #sponsor, #gitgui, #gitclient, #versioncontrol

Download Tower - the brand new Git Client for Windows - and get started today.

.net

Announcing .NET Core, .NET Native and NuGet Updates in VS 2017 RC

#csharp

We just released updates to the .NET Core SDK, .NET Native Tools and NuGet, all of which are included in Visual Studio 2017 RC. You can also install the .NET Core SDK for command-line use, on Windows, Mac and Linux. Please check out the ASP.NET blog to learn more about Web Tools updates and the Visual Studio blog for the Visual Studio 2017 RC update.

The .NET Language Strategy

#csharp, #dotnet

I’ve been here on the .NET languages team at Microsoft for more than a decade, and I’ve always seen us have developers’ interests first and foremost in our minds as we moved the languages forward. The open source revolution (of not just the .NET languages but the whole .NET stack) has improved the conversation dramatically, and – I think – helped us to make better choices. However, we haven’t always been good at sharing how we make those decisions: Our language strategy; the framework for how we think about each of our .NET languages and chart their evolution.

C#7: Local Functions

#csharp

In today's post, we will look at local functions. Those who are familiar with JavaScript will be familiar with local functions; the ability to define a method inside of another method. We have had a similar ability in C# since anonymous methods were introduced albeit in a slightly less flexible form1. Up until C#7, methods defined within another method were assigned to variables and were limited in use and content. For example, one could not use yieldinside anonymous methods.

Why I decided to abandon dot.net core and return to .NET Framework • /r/dotnet

#csharp, #dotnetcore

In my opinion, dot.net core is not mature enough for my situation, so I scrapped a month's worth of work in dot.net core and will return to .NET framework.

How to capture a variable in C# and not to shoot yourself in the foot

#csharp

Back in 2005, with the release of C# 2.0 standard we got a possibility to pass a variable to the body of an anonymous delegate by capturing it from the current context. In 2008 the C# 3.0 brought us lambdas, user anonymous classes, LINQ requests and much more. Now it January, 2017 and the majority of C# developers are looking forward to the release of the C# 7.0 standard that should provide us a bunch of new useful features. However, there are still old features that need to be fixed. That's why there are plenty of ways to shoot yourself in the foot. Today we are going to speak about one of them, and it is related with quite an unobvious mechanism of variable capture in the body of anonymous functions in C#.

Show more