0

Looking at the official Microsoft class vs struct design guidelines (from http://msdn.microsoft.com/en-us/library/ms229017(v=vs.110).aspx)

  • It logically represents a single value, similar to primitive types (int, double, etc.).
  • It has an instance size under 16 bytes.
  • It is immutable.
  • It will not have to be boxed frequently.

Tuples should fit all of the above, except possibly the size. Smaller tuples will be less than 16 bytes, but larger tuples will not. Larger tuples are chepaer to pass by reference than pass by value (which means value copying).

user2684301
  • 2,550
  • 1
  • 24
  • 33

0 Answers0