этот метод тестирования работает, но IntelliSense не показывает "Ключ" и "Значение" (формы Windows). Так что его проблема IntelliSense.
static void TestParallelForEachKeyValuePair()
{
List<KeyValuePair<int, string>> test = new List<KeyValuePair<int, string>>();
test.Add(new KeyValuePair<int, string>(1, "test1"));
test.Add(new KeyValuePair<int, string>(2, "test2"));
test.Add(new KeyValuePair<int, string>(3, "test3"));
Parallel.ForEach(test, (x) =>
{
MessageBox.Show(x.Key + " " + x.Value);
});
}