title: C#: What style of data containers are preferred in general?
body: <p>When creating a simple data container class, what should it be?</p>
  
  <ul>
  <li>Class or struct?</li>
  <li>Mutable or immutable?</li>
  <li>With or without non-empty constructor?</li>
  </ul>
  
  <p>Examples of the above:</p>
  
  <pre><code>struct MutableStruct
  {
      public string Text { get; set; }
      public int Number { get; set; }
  }
  
  struct ImmutableStruct
  {
      public string Text { get; private set; }
      public int Number { get; private set; }
      public ImmutableStruct(string text, int number)
          : this()
      {
          Text = text;
          Number = number;
      }
  }
  
  struct MutableStructWithConstructor
  {
      public string Text { get; set; }
      public int Number { get; set; }
      public MutableStructWithConstructor(string text, int number)
          : this()
      {
          Text = text;
          Number = number;
      }
  }
  class MutableClass
  {
      public string Text { get; set; }
      public int Number { get; set; }
  }
  
  class ImmutableClass
  {
      public string Text { get; private set; }
      public int Number { get; private set; }
      public ImmutableClass(string text, int number)
      {
          Text = text;
          Number = number;
      }
  }
  
  class MutableClassWithConstructor
  {
      public string Text { get; set; }
      public int Number { get; set; }
      public MutableClassWithConstructor(string text, int number)
      {
          Text = text;
          Number = number;
      }
  }
  </code></pre>
  
  <p>Any good reasons we should choose one above another? Or are there mostly subjective preferences that separate them? Or does it depend a lot on the spesific use cases? If so in what use cases should you choose what and why?</p>