I have the following object:
Dictionary<string, List<SubmitSm>> smDic
i would advise you to use a
System.Collections.Concurrent.ConcurrentDictionary in that case. It also implements the
IDictionary interface and can be used in a thread safe manner for performing additions and deletions. See http://msdn.microsoft.com/en-us/library/dd287191.aspx
A variant for
ToDictionary for concurrent dictionaries as requested, that does not need intermediate conversion to a
KeyValuePair can be found here: Extension method Gets "No overload for method" Error.