C# Struct: Definition, Examples, Best Practices, and Pitfalls
Ahh, C# structs: a classic carryover from the C/C++ days. Have you ever used one? Wondering how they work? Well, they are similar to classes with some substantial differences. Structs have niche value to us as C# developers. You don’t often need them, but there are some things they do better than classes.
They also come with some caveats. Let me walk you through all this through a series of code examples.