This is part 8 in a series of articles. ICYMI C# 8 New Features: Asynchronous Streams. In earlier versions of C# you could return an IEnumerable<T> from a method, for example to be consumed by a foreach loop.
This is part 8 in a series of articles.
In earlier versions of C## you could return an IEnumerable from a method, for example to be consumed by a foreach loop.
The following example shows a method from a WPF app that returns 3 web pages as string content:
When you run the app and click the button, the 3 web pages will be loaded and added to the content of the
While loading the 3 web pages and looping through the foreach loop however, the app will be unresponsive until all 3 pages have been returned in the foreach loop.
C## 8 introduced the ability to use the IAsyncEnumerable interface to iterate items asynchronously.
The “asynchronous streams” feature of C## 8 should not be confused with the streams in the System.IO namespace.
How to use C#9 and C#8 features in JustMock unit tests
This is part 5 in a series of articles.One of the new features that C# 8 introduced was the ability to work more simply with arrays and items within arrays.One of the new features that C# 8 introduced was the ability
One nice little enhancement introduced in C# 8 helps to simplify code that uses disposable objects.
This is part 3 in a series of articles. In the first part of this series we looked at switch expressions. When making use of switch expressions, C# 8 also introduced the concept of property pattern matching. This enables you to match on one or more items of an object and helps to simplify multiple if..else if statements into a more concise form.
In this series we’ve already covered switch expressions and one little-known feature is the ability to nest switch expressions.