stringbuilder versus string concat

后端 未结 6 694
醉梦人生
醉梦人生 2020-12-01 11:14

In my project I am looping across a dataview result.

 string html =string.empty;
 DataView dV = data.DefaultView;
 for(int i=0;i< dV.Count;i++)
 {
     Da         


        
6条回答
  •  攒了一身酷
    2020-12-01 11:54

    stringbuilder is what you are looking for. In general, if there is a function for some job try to utilize it instead of writing some procedure which does pretty much the same job.

提交回复
热议问题