I have a data table .I want to copy some column to another data table .
- data table dt=new data table();//Having four columns
- data table dtcopy=new data table();//I want to copy the datatable dt first and last column to this data table
| Col1 | col2 | col3 | col4 |
My result is:(dtcopy)
| Col1 | col4 |

Midhun TpRank #388 · 6.5K reputationPosted Jan 1, 2017, 7:22 PM EST
sudipta sanyalRank #1,945 · 753 reputationPosted Jan 1, 2017, 7:11 PM EST
Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 1, 2017, 7:13 PM EST
Amit Kumar SinghRank #562 · 4.3K reputationPosted Jan 1, 2017, 8:19 PM EST
System.Data.DataTable selected = view.ToTable("Selected", false, "col1", "col2", "col6", "col7", "col3");Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 1, 2017, 8:25 PM EST