Microsoft plans for C# 9.0 — Blazor WebAssembly official releases

Microsoft announced in Build 2020. NET” related news. NET team plans for the company’s programming language C#and the official release of Blazor WebAssembly.

According to Mads Torgersen, the company’s C# lead designer, “C#9.0” is pursuing “greater clarity and simplicity in common coding scenarios.” However, the release focuses specifically on “supporting concise and immutable expressions on data shape.”

C# is a language created by Anders Hejlsberg, a technical fellow at Microsoft, and was released in the early 2000s. Hejlsberg is known as the creator of TypeScript, which is popular as an extension language for JavaScript for large applications.

The preview version of C# 9.0 will be released without waiting a year from the release of C# 8.0. C# 8.0 was released with Visual Studio 2019 in 2019, as it will be included with .NET Core 3.0 with F# 4.7.

The effort to express a concise and invariant of the data shape focuses on the object initializer for assigning the value of each property when generating the object. First, Torgersen explains that as a constraint at the moment, the object initializer must be modifiable (mutable) in order to fulfill its function, citing the following code:

new Person
{
FirstName = “Scott”,
LastName = “Hunter”
}

public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}

“The initializer first calls the object’s constructor (the default constructor, or parameterless constructor), and then performs an assignment operation on the property setter,” he explains.

He said, “The init-only property will solve this problem! This time, we introduced the init accessor. This is a type of set accessor that can only be called during object initialization.”

public class Person
{
public string FirstName { get; init; }
public string LastName { get; init; }
}

Torgersen also suggests that the init-only property is also useful for giving individual properties immutable. He also explains that with expressions introduced in C# 9.0 improve support for immutable data.

. NET and C#, there is also news that blazor WebAssembly has officially been released. Blazor WebAssembly is a framework for C# and .NET developers to develop browser apps that behave like traditional desktop apps, also known as Progressive Web Apps,PWA, and have been in preview.

Asp. NET principal program manager Daniel Roth announced the release of Blazor WebAssembly 3.2.0, saying it was “fully functional, supported releases, and ready for live use.”