When is it better to use a Tuple versus a KeyValuePair?

前端 未结 4 1241
臣服心动
臣服心动 2021-02-01 11:49

I\'ve generally used the KeyValuePair type whenever I have data that is pair-related in the sense that one is a key to the other. If the data is

4条回答
  •  伪装坚强ぢ
    2021-02-01 12:06

    Your really asking the wrong question the proper question is using a Class(Tuple)_ better than a Struct(KVP) in which case the is answer is what do you want to use them for and the answer is given here Structs versus classes

提交回复
热议问题