var rm = new ResourceManager(sometype); var resourceSet = rm.GetResourceSet(CultureInfo.CurrentUICulture, true, true);
I want to convert the above resource set to a dictionary. I am currently doing this manually, looping as shown below.
var resourceDictionary = new Dictionary<string, string>(); foreach (var r in resourceSet) { var dicEntry = (DictionaryEntry)r; resourceDictionary.Add(dicEntry.Key.ToString(), dicEntry.Value.ToString()); }
How can I achieve this easily using linq?
c # linq
Vjai
source share