字典

int s;
bool c = dic.TryGetValue(“xiaoming”, out s);
这个方法是有返回值的,如果他能够找到小明,它会返回true,如果找不到呢,他它就会返回false。

原文地址:https://www.cnblogs.com/xiaohua19920/p/9767034.html