In the previous article, we discussed C# 8 default interface methods. In this article, we’ll look at C# 8 nullable reference types. Reference types refer to an object that is on the heap. When there is no object to refer to, the value is
null is an acceptable value, but often it is an illegal value that leads to
C# 8 finally gives us the ability to express whether a variable shouldn’t be
null, and when it can be
null. Based on these annotations, the compiler will warn you when you are potentially using a
null reference, or passing a
null reference to a function that won’t accept it.
Continue reading “C# 8 nullable reference types”
.NET Core 3.1 (December 2019) includes support for C# 8, a new major
version of the C# programming language. In this series of articles, we’ll look at the new features in .NET’s main programming language. This first article, in particular, looks at asynchronous streams. This feature makes it easy to create and consume asynchronous enumerables, so before getting into the new feature, you first need to understand the IEnumerable interface.
Note: C# 8 can be used with the .NET Core 3.1 SDK, which is available on Red Hat Enterprise Linux, Fedora, Windows, macOS, and on other Linux distributions.
A brief history of IEnumerable
IEnumerable<T> has been around since .NET Framework 2 (2005). This interface provides us with a type-safe way to iterate over any collection.
The iteration is based on the
Continue reading “C# 8 asynchronous streams”
We are very excited to announce the general availability of .NET Core 3.1 for Red Hat Enterprise Linux 7!
.NET Core 3.1 offers a small number of fixes over .NET Core 3.0 and is a long-term supported (LTS) release, which will be supported for three years.
Continue reading “.NET Core 3.1 for Red Hat Enterprise Linux 7 now available”