How to use StringBuilder in c# with Append method

using System.Text;
Logic to use StringBuilder in Program to display the report. with append method

To improve performance of application.
StringBuilder strAppend = new StringBuilder();
if (dsrpt.Tables[0].Rows.Count != 0)
{
for (int i = 0; i < dt1.Rows.Count; i++)
{

strAppend.Append("

");
strAppend.Append("");
strAppend.Append("");

strAppend.Append("
" + (dt1.Rows[1][0]) + "
" + (dt1.Rows[2][1]) + "
");

}
}

0 comments:

Post a Comment