I want to add data to dictionary of string,Tuple(string,string).
How to assign dictionary of key to tuple value.
Assign-
Dict(row(“Employee”).tostring)=Tuple(row(“EmpId”).tostring,row(“EmpName”).tostring)
Giving error.
How to assign values to key employee with value in tuple of string, string.
Or how to convert datarow to other datatable.
Datarow.CopyToDatatable not working.
Gokul001
(Gokul Balaji)
2
HI @Mansi_Mhatre
I’m not sure about this expression, just have a try
DT_Master.AsEnumerable().GroupBy(Function(r) Tuple.Create(r("EmpId").ToString,r("EmpName").ToString)).Select(Function(g) g.First).CopyToDataTable
Looping @Yoichi to look on this
Regards
Gokul
Yoichi
(Yoichi)
3
Hi,
Can you try as the following?
Dict(row("Employee").ToString) = Tuple.Create(row("EmpId").ToString,row("EmpName").ToString)
Regards,
1 Like
jbarnes
(jbarnes)
4
Thank you, it has been the solution for me