Dictionary<string, string> dict = new Dictionary<string, string>(); list.Add("BENEFICIARY", "受益所有人"); var res12 = string.Empty; var dicKey = "1000"; dict.TryGetValue(dicKey, out res12); res12 = string.Empty; dicKey = "BENEFICIARY"; dict.TryGetValue(dicKey, out res12); res12 = string.Empty; dicKey = "1000"; if (dict.Keys.Contains(dicKey)) { res12 = dict[dicKey]; } res12 = string.Empty; dicKey = "BENEFICIARY"; if (dict.Keys.Contains(dicKey)) { res12 = dict[dicKey]; } res12 = string.Empty; dicKey = "1000"; if (dict.ContainsKey(dicKey)) { res12 = dict[dicKey]; } res12 = string.Empty; dicKey = "BENEFICIARY"; if (dict.ContainsKey(dicKey)) { res12 = dict[dicKey]; }