Replies: 2 comments
-
Doing so is hard; it requires adding more lifetime annotations to the language. See https://github.com/dotnet/csharplang/blob/main/proposals/expand-ref.md#ref-field-to-ref-struct. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
^^ question. It'd be very useful in case you need to wrap a (ref) struct with new interface (so that it can be constrained over with generics) that is both ref struct but also contains some non-ref state which means it cannot just be copied into a wrapper without downstream issues.
Beta Was this translation helpful? Give feedback.
All reactions