Steven Giesel 3/25/2024

C# 13: Allow ref and unsafe in iterators and async

Read Original

The article discusses a proposed feature for C# 13 that would permit the use of 'ref' parameters, 'ref structs' like Span<T>, and 'unsafe' code within iterator (yield) and asynchronous methods. It explains the current compiler restrictions and the motivation for the change, providing code examples to illustrate the potential new capabilities.

C# 13: Allow ref and unsafe in iterators and async

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week