ICYMI C# 8 New Features: Asynchronous Streams

ICYMI C# 8 New Features: Asynchronous Streams

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.

icymi c# 8

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Let's Give Some Unit Testing Love to C# 8 and C# 9 Features

How to use C#9 and C#8 features in JustMock unit tests

ICYMI C# 8 New Features: Simplify Array Access and Range Code

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

ICYMI C# 8 New Features: Write Less Code with Using Declarations

One nice little enhancement introduced in C# 8 helps to simplify code that uses disposable objects.

ICYMI C# 8 New Features: Simplify If Statements with Property Pattern Matching

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.

ICYMI C# 8 New Features: Nested Switch Expressions

In this series we’ve already covered switch expressions and one little-known feature is the ability to nest switch expressions.