InfoQ Homepage C# Content on InfoQ
-
.NET News Roundup - Week of April 5th, 2021
The last week was an eventful one for the .NET community, with multiple releases from Microsoft - including the third preview for .NET 6, ASP.NET Core, MAUI, and EF Core 6. InfoQ examined these and a number of smaller stories in the .NET ecosystem from the week of April 5th, 2021.
-
Microsoft Using Metadata to Enable Idiomatic Win32 Interop from Rust and Other Languages
In a move to make it easier to use Win32 APIs from any language, Microsoft has launched its Win32 Metadata project with the aim of generating complete Win32 language bindings through automated, idiomatic projections. The project includes initial projections for C#, C++, and Rust.
-
Infer# Brings Facebook's Infer Static Analyzer to C# and .NET
With Infer#, Microsoft extends the choice of static analyzers available within the .NET ecosystem by bringing Facebook Infer's inter-procedural static analysis capabilities to it.
-
The Resurgence of Functional Programming - Highlights from QCon Plus
The Resurgence of Functional Programming track at QCon Plus featured several experts describing how functional programming makes developing software a joyful experience. They also told why and how object-oriented languages such as C# and Java are evolving by becoming more functional.
-
C# Futures: Null Check Operator
In the June 24th C# Language Design Meeting, Microsoft made a subtle change to the parameter null checking syntax. By changing it from “Type parameterName!” to “Type parameterName!!” they effectively introduced a new ‘null check operator’.
-
C# 9: towards First Class Support for Scripting
One of the defining characteristics of “scripting” languages is they don’t need any boilerplate. The very first line of a file can be the declarations and statements you would normally see inside a function. In the updated Top-level statements proposal, this capability is planned for C# 9.
-
Source Generators Will Enable Compile-Time Metaprogramming in C# 9
Source generators are a new feature of the C# compiler that enables inspecting user code using compiler-generated metadata and generating additional source files to be compiled along with the rest of the program.
-
C# Static Analysis Tool Roslynator.Analyzers Now Has over 500 Ways to Improve Code
The new version 2.3.1 of the Roslynator.Analyzers package brings the number of analyzers, refactorings and fixes to over 500. Roslynator uses the open-source Roslyn .NET Compiler Platform to perform static analysis on your C# code. This analysis drives your IDE to display hints and actions to improve your code.
-
C# Futures: Primary Constructors
We last mentioned primary constructors in 2014 when it was removed from the candidate list for C# 6 and VB 12. Late last year, Primary Constructors reappeared as a candidate for C# 9.
-
C# Futures: Covariant Return Types
A frequent API design problem is the inability to use a more specific return type when overriding a method. Proposal 49, which is now a C# 9 candidate, seeks to correct this issue.
-
C# Futures: Simplified Parameter Null Validation
At first glance, proposal #2145 seems like a logical extension to C# 8’s Nullable Reference Types feature. The basic idea is developers would no longer need to explicitly add argument null checks to methods that accept non-nullable parameters. However, this has become quite contentious.
-
C# 9 Proposals: Module Initializers
The module initializer proposal has been promoted to C# 9 candidacy. This would act like a static constructor in C#, but rather than applying to one class it applies to the entire assembly.
-
Stateful Programming Models in Serverless Functions: Chris Gillum at QCon San Francisco
Chris Gillum, principal engineering manager at Microsoft, presented at QCon San Francisco on Serverless Programming Models in Azure Functions. In his presentation, he discussed two stateful programming models, workflow and actors on Azure Functions - Microsoft’s implementation of serverless compute.
-
A Proposal for IDisposable and Static Analysis: DisposeUnused Attribute
When .NET was first created, there was uncertainty about how IDisposable should be used. As a result, IDisposable was applied in an overly aggressive fashion with many categories of classes requiring empty Dispose methods. This has led to problems with static analysis tools that cannot separate real cases of missing Dispose calls from false positives.
-
Microsoft Releases C# 8.0
Last week Microsoft announced the official availability of C# 8.0 as part of the .NET Core 3.0 release, simultaneously at .NET Conf 2019 and on their development blog. The new language features include nullable reference types, asynchronous streams, default interface members, and new code patterns. All new features are supported in Visual Studio 2019.