- I hava records from database in DataTable.
- I wan't to convert the DataTable into a text.
- Return the text as string.
Example: Database/DataTable
id|name|age
___________
1 |Amy |17
2 |Max |23
3 |aaa |50
......
And this my code:
string result = MyFunction(MyDataTable);
MyDataTable is the DataTable and MyFunction should return this:
['id','name',age]
[['1','Amy','17']
['2','Max','23']
['3','aaa','50']]
How can I make MyFunction do this?