Practical example where Tuple can be used in .Net 4.0?

后端 未结 19 697
后悔当初
后悔当初 2020-12-04 07:44

I have seen the Tuple introduced in .Net 4 but I am not able to imagine where it can be used. We can always make a Custom class or Struct.

19条回答
  •  死守一世寂寞
    2020-12-04 08:16

    Only for prototyping - Tuples are meaningless. It convenient to use them but it's a shortcut only! For prototypes - fine. Just be sure to delete this code later.

    It easy to write, hard to read. It has no visible advantages over classes, inner classes , anonymous classes etc.

提交回复
热议问题