title: Why can I declare a ref struct as a member of a class in c#7.3?
body: <p>According the <a href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ref#ref-struct-types" rel="nofollow noreferrer">docs</a>:</p>
  
  <blockquote>
    <p>You <strong>can't</strong> declare a ref struct as a member of a class or a normal struct.</p>
  </blockquote>
  
  <p>But I managed to compile and run this:</p>
  
  <pre><code>public ref struct RefStruct
  {
      public int value;
  }
  public class MyClass
  {
      public RefStruct Item =&gt; default;
  }    
  ...       
  
  MyClass c = new MyClass();
  Console.WriteLine(c.Item.value);
  </code></pre>
  
  <p>Now <code>RefStruct</code> is a <code>ref struct</code> and it is a member of a class.
  Is this statement wrong in some cases?</p>
  
  <p><strong>UPDATE</strong>
  Now the docs have been updated to a more precise description.</p>