You should check the rules for using value types: http://msdn.microsoft.com/en-us/library/y23b5415(vs.71).aspx
The article lists several important points, but the ones that, in my opinion, are the most valuable, are as follows
- Is the value immutable?
- Do you want the type to have semantics of values?
If the answer to both questions is yes, then you almost certainly want to use a structure. Otherwise, I would advise going with the class.
There are problems using structures with a large number of members. But I believe that if I look at these two points above, I rarely have more than the recommended number of members / size in my value types.
source
share