Using String Builder

Let's see how to use the string builder in C#:-

 StringBuilder line = new StringBuilder();
            //Appending the data
            using (StreamReader rwOpenTemplate = new StreamReader(pgTemplate))
            {
                while (!rwOpenTemplate.EndOfStream)
                {
                    line.Append(rwOpenTemplate.ReadToEnd());
                }
            }



Ebook Download
View all
Learn
View all