Tuple == Confusion

前端 未结 3 1033
清歌不尽
清歌不尽 2021-02-18 18:26

Suppose I define two tuples:

Tuple tuple1 = new Tuple(1.0f, 2.0f, 3.0f, 4.0f);
Tuple

        
3条回答
  •  野性不改
    2021-02-18 19:19

    == for Tuple will only see the references and hence you will see that it is false.

    PS: Recommended way is to do something like:

    var tuple1 = Tuple.Create(1.0f, 2.0f, 3.0f, 4.0f)
    

提交回复
热议问题