问题 I have dictionary with the following keys and values. I am trying to print the dictionary, but nothing prints where there is a null value. How do I print "null" in the output? Dictionary<string, object> dic1 = new Dictionary<string, object>(); dic1.Add("id", 1); dic1.Add("name", "john"); dic1.Add("grade", null); Console.WriteLine(string.Join(Environment.NewLine, dic1.Select(a => $"{a.Key}: {a.Value}"))); Here is the output I get: id: 1 name: john grade: 回答1: You can use the null-coalescing