2 min

Tags in this article

The latest C# 11 preview highlights are based on list pattern implementations and parameter null-checking.

C# team is launching a new version of C# programming called C# 11. As Visual Studio 17.1 became available, developers could preview some features of this new C# programming. Developers should expect the launch of this new version in November 2022.

C# team is collecting feedback

The new version C# 11 implements a list pattern and parameter null-checking. C# has included the parameter null-checking early in the development process. Due to this, they require feedback to check it is functioning correctly for all the tasks it is created for. That is because the C# team has experienced a lot of bumps and troubles since the start of the design phase. Therefore, now they want to collect feedback to ensure C# 11 is perfect at its launch time.

What is parameter null-checking?

In the beginning, parameter null-checking was introduced as the simplest way to validate the method arguments. It was used to check whether they were null before throwing the corresponding exception. The work on nullable reference types is the inspiration behind this phenomenon.

People can use this by positioning the double bang operator ( ! ! ) after the item name in the list of parameters. However, it is not applicable on parameters without implementation, external method parameters, delegate parameters, and interface method parameters with non-DIM methods. This is because, in those situations, the C# compiler interprets the double bang operator as bull checking code, issuing a warning that the double bang operator must be combined with an explicitly nullable parameter.

However, the new version of C# programming is easier to write because of new lines in interpolations. But the developers who want to create string literals with arbitrary text in C# have to wait for the next VS update. This update will be included in the next VS 17.2 version, along with cache delegation for static method group conversions.

Apart from these programs, the C# team is also making headway in language, a new and fundamental N-bit integers type, and integer safety.