To convert an object collection to a dictionary by choosing a couple of the properties from the object to form the dictionary keys and values, use the following code in C#
var dict = TableObj.Select( t => new { t.Key, t.TimeStamp } ) .ToDictionary( t => t.Key, t => t.TimeStamp );
Comments
Post a Comment