var collection = new Dictionary<string,TypeA>();
foreach(var item in collectionTypeB)
collection[item.Key] = (TypeA)item.Value;
Open in new window
var newDict = new Dictionary<string,TypeA>();
foreach(var item in oldDict)
newDict[item.Key] = (TypeA)item.Value;
Get your personalized solution.
Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.
*This site is protected by reCAPTCHA and the Google
Terms of Service apply.
Please enter a first name
Please enter a last name
8+ characters (letters, numbers, and a symbol)
Take hold of your future.