Category: MSDN: Essential .NET

.NET Reunified – Microsoft’s Plans for .NET 5 (MSDN)

When Microsoft announced .NET 5 at Microsoft Build 2019 in May, it marked an important step forward for developers working across desktop, Web, mobile, cloud and device platforms. In fact, .NET 5 is that rare platform update that unifies divergent frameworks, reduces code complexity and significantly advances cross-platform reach. This is no small task. Microsoft […]

Essential .NET: Parse the Command Line with System.CommandLine (MSDN)

Going all the way back to. NET Framework 1.0, I’ve been astounded that there’s been no simple way for developers to parse the command line of their applications. Applications start execution from the Main method, but the arguments are passed in as an array (string[] args) with no differentiation between which items in the array […]

Tuple Trouble – Why C# Tuples Get to Break Guidelines

Back in the August 2017 issue of MSDN Magazine I wrote an in-depth article on C# 7.0 and its support for tuples (msdn.com/magazine/mt493248). At the time I glossed over the fact that the tuple type introduced with C# 7.0 (internally of type ValueTuple<…>) breaks several guidelines of a well-structured value type, namely: Do Not declare […]

Essential .NET: C# 8.0 and Nullable Reference Types (MSDN)

Nullable reference types—what? Aren’t all reference types nullable? I love C# and I find the careful language design fantastic. Nonetheless, as it currently stands, and even after 7 versions of C#, we still don’t have a perfect language. By that I mean that while it’s reasonable to expect there will likely always be new features […]

Essential .NET: Custom Iterators with Yield (MSDN)

In my last column (msdn.com/magazine/mt797654), I delved into the details of how the C# foreach statement works under the covers, explaining how the C# compiler implements the foreach capabilities in Common Intermediate Language (CIL). I also briefly touched on the yield keyword with an example (see Figure 1), but little to no explanation. Figure 1 […]

C# foreach Internals and Custom Iterators with yield

This month I’m going to explore the internals of a core construct of C# that we all program with frequently—the foreach statement. Given an understanding of the foreach internal behavior, you can then explore implementing the foreach collection interfaces using the yield statement, as I’ll explain. Although the foreach statement is easy to code, I’m […]

Essential MSBuild-A Build Engine Overview for .NET Tooling (MSDN)

Those of you who have been following .NET Core over the past few years (has it been that long?) know all too well that the “build system” has experienced a significant amount of flux, whether it be dropping built-in support for gulp or the demise of Project.json. For me as a columnist, these changes have […]

Essential .NET: What’s New in C# 7.0 (MSDN)

Back in December 2015, I discussed the designing of C# 7.0 (msdn.com/magazine/mt595758). A lot has changed over the last year, but the team is now buttoning down C# 7.0 development, and Visual Studio 2017 Release Candidate is implementing virtually all of the new features. (I say virtually because until Visual Studio 2017 actually ships, there’s […]

Essential .NET: PowerShell Just Keeps Getting Better (MSDN)

In a departure from my recent focus on .NET Core, in this month’s Essential .NET Column I’m going to focus on a host of new features that significantly increase the power of Windows PowerShell. To me, the most significant improvements are in the area of cross-platform support—yes, really, PowerShell now runs on Linux. Not only […]