h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

StringBuilder in Class file using C#.Net

Create a Class file in your project.
My class file name is Master.cs.In that class file , i create a Two Properties and One String Builder .
  public int TestId { get; set; }
        public string TestName { get; set; }
        public StringBuilder  result = new StringBuilder();


In my For , It contains 2 Test Box and One Command Button. I called a class(Master) when user clicks a Command button

     Master mst = new Master();
            mst.TestId = Convert.ToInt32(txtId.Text);
            mst.TestName = txtName.Text;
          mst.result.Append( "Id No:" + mst.TestId + " " + "Name" + " " + mst.TestName); 
            MessageBox.Show(mst.result.ToString())