struct Foo { int i; public ref int I => ref i; }
此代码引发编译错误CS8170,但如果Foo是类,则不会.为什么结构不能将成员作为引用返回?
Foo
c#
c# ×1