c# Dictionary拓展2个key得到1个value

2021-04-03 03:24

阅读:703

标签:div   color   using   tuple   span   ict   collect   val   code   

using System.Collections.Generic;
using System.Collections;
Dictionaryint, int>, int> dic = new Dictionaryint, int>, int>();
dic.Add(new Tupleint, int>(1, 2), 100);
dic.Add(new Tupleint, int>(1, 3), 200);
dic.Add(new Tupleint, int>(2, 1), 300);
int result = dic[new Tupleint, int>(1, 3)];   //200

 

c# Dictionary拓展2个key得到1个value

标签:div   color   using   tuple   span   ict   collect   val   code   

原文地址:https://www.cnblogs.com/code1992/p/9208063.html


评论


亲,登录后才可以留言!