遍历并修改dictionary的值

var dictionary = clb_Select.Items.Cast<object>().ToDictionary(item => item.ToString(), item => false);

foreach (var checkedItem in clb_Select.CheckedItems)
{
if (dictionary.ContainsKey(checkedItem.ToString()))
{
dictionary[checkedItem.ToString()] = true;
}
}

上一篇:golang并发ping主机


下一篇:网络基础知识(一)wireshark 三次握手实践