title: When structures are better than classes?
body: <p>Duplicate of: <a href="https://stackoverflow.com/questions/521298/when-to-use-struct-in-c">When to use struct in C#?</a></p>
  
  <p>Are there practical reasons to use structures instead of some classes in Microsoft .NET 2.0/3.5 ?</p>
  
  <p>"What is the difference between structures and classes?" - this is probably the most popular question on intrviews for ".NET developer" vacancies. The only answer that interviewer considers to be right is "structures are allocated on stack and classes are allocated on heap" and no further questions are asked about that.</p>
  
  <p>Some google search showed that:   </p>
  
  <blockquote>
    <p><strong>a)</strong> structures have numerous limitations and no additional abilities in comparison to classes and<br>
    <strong>b)</strong> stack (and as such
    structures) can be faster on <em>very</em> specialized conditions including: </p>
    
    <ul>
    <li>size of data chunk less that 16 bytes</li>
    <li>no extensive boxing/unboxing</li>
    <li>structure's members are nearly immutable</li>
    <li>whole set of data is not big (otherwise we get stack overflow)</li>
    </ul>
  </blockquote>
  
  <p>(please correct/add to this list if it is wrong or not full)</p>
  
  <p>As far as I know, most typical commercial projects (ERM, accouting, solutions for banks, etc.) do not define even a single structure, all custom data types are defined as classes instead. Is there something wrong or at least imperfect in this approach?</p>
  
  <p>NOTE: question is about run-of-the-mill business apps, please don't list "unusual" cases like game development, real-time animation, backward compatibility (COM/Interop), unmanaged code and so on - these answers are already under this similar question: </p>
  
  <p><a href="https://stackoverflow.com/questions/521298/when-to-use-struct-in-c">When to use struct?</a></p>