Hi I got some issues in transferring LINQ output in a datatable that I'll see on a DataGridView, Here is the Code;
I pass two datatables as parameters and then I receive an error in Join_Table.CopyToDataTable() saying anonymous types etc...
public DataTable Join(DataTable DT_Derivati, DataTable dt_Cambi)
{
var Join_Table = from A in DT_Derivati.AsEnumerable()
join B in dt_Cambi.AsEnumerable()
on A.Field<string>("CCY") equals B.Field<string>("Currency")
select new
{
CCY = (string)A["CCY"],
Importo = (int)A["IMPORTO"],
Cambio_ = (int)B["Quotazione"],
Nota_ = (int)B["Nota"]
};
DataTable boundTable = ***Join_Table.CopyToDataTable***();
return boundTable;
}
Any Tips?