I know that its possible to convert a List of KeyValuePair into a Dictionary, but is there a quick way (besides looping through manually) to perform the vice versa operation?
This would be the manual way,
foreach (KeyValuePair<double,double> p in dict)
{
list.Add(new KeyValuePair<double,double>(p.Key,p.Value));
}
Not really that bad but I was just curious.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…