嘿,我是 C# 的新手,我写了这段代码:
static void Main()
{
Dictionary<int, HashSet<string>> dict1 = new Dictionary<int, HashSet<string>>();
Dictionary<int, HashSet<string>> dict2 = new Dictionary<int, HashSet<string>>();
// ...
CompareDicts(dict1, dict2);
}
private static void CompareDicts(Dictionary<int, HashSet<string>> dict1, Dictionary<int, HashSet<string>> dict2)
{
// Blah blah
}
有什么方法可以使这段代码更具可读性(更短)?