If you want to store values of a datatable in a jagged array using LINQ you can achieve in the following ways.
string[][] Value = dt.Rows.OfType<DataRow>().
Select(r => dt.Columns.OfType<DataColumn>().
Select( c => r[c.ColumnName].ToString()).ToArray()).
ToArray();
Wednesday, 26 June 2013
Subscribe to:
Post Comments (Atom)
Copyright 2013 Keep Smiling Always
0 comments:
Post a Comment