And if you like LINQ:
Dictionary to NameValueCollection
return dictionary.Aggregate(new NameValueCollection(),
(seed, current) => {
seed.Add(current.Key, current.Value);
return seed;
});
NameValueCollection to Dictionary
(source)
return source.Cast()
.ToDictionary(s => s, s => source[s]);