using
statememt Duck-Type support
#8517
-
Proposal: Allow using Statement for Duck-Typed Structs Without IDisposable to Avoid Boxing Summary: Motivation: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is not true unless you cast the struct to the Also, the compiler does support pattern-based |
Beta Was this translation helpful? Give feedback.
See: #93
Also see: https://github.com/dotnet/csharplang/blob/main/meetings/2018/LDM-2018-12-12.md#when-we-start-recognizing-pattern-dispose-do-we-call-it-in-foreach