Why Tuple's items are ReadOnly?

前端 未结 4 1701
南旧
南旧 2020-12-03 06:30

I was thinking to use Tuple class to store 2 integer information (StartAddress, EndAddress) I need in my program.

But I discover that Tuple

4条回答
  •  我在风中等你
    2020-12-03 07:02

    You might want to try upgrading, as C# 7.0 introduces new language support for Tuples which (among other things) makes them mutable. (Under the hood, it uses ValueTuple, whose members are mutable.)

提交回复
热议问题