c# - How to retrieve pair of columns from a DataTable as a Dictionary -


I have a datat that has a simple key value added. How do I return a dictionary object (DataTable.AsEnumerable ( ) << p>

code dict = DataTable.AsEnumerable (). ToDictionary (R = & gt; r.Field & lt; String> ("KeyColumn"), r = & gt; r.Field & lt; DateTime> ("ValueColumn");

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -