Hi Experts,
I want to copy contents from dictionary<Of string, Object> to a Datarow.
E.g. dictVar = new Dictionary(of String, Object) contains three entries
- Name: “ABC”
- Age: 10
- Address: “ABC Street”
Data row (drSampleRow)has exactly same columns (Name, Age, Address) extracted from say table dtSampleTable(Column1:Name, Column2: Age, Column3: Address) containing few more rows.
I have achieved it by using For each loop as shown below. However, I want to replace it with LINQ to achieve better performance.
For each (field in drSampleRow.Table.Columns)
----drSampleRow(field.ColumnName)=dictVar(field.ColumnName)
Thanks in Advance,
CT