Tag: 并发编程

这是在C#中迭代Concurrentdictionary的正确方法吗?

我只是用这个代码作为例子。 假设我有以下Person类。 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace dictionaryDisplay { class Person { public string FirstName { get; private set;} public string LastName { get; private set; } public Person(string firstName, string lastName) { this.FirstName = firstName; this.LastName = lastName; } public override string ToString() { return this.FirstName + ” ” + […]