Tuple == Confusion

前端 未结 3 1036
清歌不尽
清歌不尽 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

    == is comparing object references. The Tuple class does not overload the == operator, so you need to use .Equals.

提交回复
热议问题