How to concatenate two columns in datatable without looping and keep concatinated data in new column?


This is the my case:

Name Account
AA 123
BB 345
CC 654

Output should like this:
Name Account Formula
AA 123 AA123
BB 345 BB345
CC 654 CC654

This should done without loops



Hi, From where this datatable is populated, there itself you can try to populate the third column as well. Sorry if my understanding is not correct here. Let us know where you are getting the datatable dt1.


DB or from Excel


If it is from DB then we can achieve this using query in the database itself.
If it is from Excel, then append the excel before reading it for the third column then read it.


Don’t go for excel or DB , I want this manipulation on DataTable only.



Check this link, they tried the similar stuff only.


The expected result is single column table with same three rows but two column merged into single column like (A1-b1, a2-b2, a3-b3)