title: Does using public readonly fields for immutable structs work?
body: <p>Is this a proper way to declare immutable structs?</p>
  
  <pre><code>public struct Pair
  {
      public readonly int x;
      public readonly int y;
  
      // Constructor and stuff
  }
  </code></pre>
  
  <p>I can't think of why this would run into problems, but I just wanted to ask to make sure.</p>
  
  <p>In this example, I used ints. What if I used a class instead, but that class is also immutable, like so? That should work fine too, right?</p>
  
  <pre><code>public struct Pair
  {
      public readonly (immutableClass) x;
      public readonly (immutableClass) y;
  
      // Constructor and stuff
  }
  </code></pre>
  
  <p>(Aside: I understand that using Properties is more generalizable and allows changing, but this struct is intended literally to just store two values. I'm just interested in the immutability question here.)</p>