Skip to content
Discussion options

You must be logged in to vote

See discussion in #1081.

With the new collection expressions feature being worked on for C# 12, there will be a new minimal and efficient syntax:

foreach (var item in myEnumerable ?? [])

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jnm2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #342 on September 08, 2020 20:09.