My questions are:
Please also discuss advantages and disadvantages of each one. I want to understand that as well.
You should use value types for small, immutable types which represent values.
Never make mutable structs.
For everything else, use reference types.
Use value types for immutables that do not have an identity of their own (a 1 is a 1), use reference types for other things.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With