I have a DataGridViewRow and I want to convert it to a string in the format mentioned below:
cell[0].ToString()+"\t"+cell[1].Tostring()+"\t"+...+cell[n].ToString()
In fact I want a string which has the string values of each cell in DataGridViewRow and a \t between them.
what is the best clean and readable way? Is using loop and checking the condition is the only way? the first solution would be to add each cell with \t to a temp string and then remove the last character of the temp string.
Whenever it’s loops, LINQ comes to the rescue.