C#遍历字典Dictionary
C#遍历字典Dictionary
List<string> list_key = new List<string>(); foreach (var str_value in dictionary_mc_agv_name) { if (str_value.Value == "JIAZHI2") { list_key.Add(str_value.Key); } } for (int i = 0; i < list_key.Count; ++i) { dictionary_mc_agv_name.Remove(list_key[i]); } jiazhi_agv2_state = "idle";
欢迎讨论,相互学习。
cdtxw@foxmail.com