Spiral noteboook with notes, pen, keyboard on desk

When should you use a struct instead of a class?

Sam RuebyC# Leave a Comment

Deciding when to use a struct in C# can be tricky. In many ways they’re the same.  If you went your entire programming career only using classes you’d probably be fine. Structs have some benefits over classes, and knowing the differences between them can give provide you a useful tool. Before I took this deep dive, two things came to my mind about …