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

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -