String Management
In your applications you would come across the need for concatenating strings. The best ways will be1. Using the += operator. Use the += operator when the number of appends is known.
May 24, 2004
In your applications you would come across the need for concatenating strings. The best ways will be
1. Using the += operator. Use the += operator when the number of appends is known.
2. String Builder. Use the String Builder object when the number of appends is unknown. Treat StringBuffer as a reusable buffer.
3. Response.Write . Use the Response. Write method. It is one of the fastest ways to return output back to the browser.
Use the following guidelines when you are managing your string
1. Use Response.Write for formatting output.
2. Use StringBuilder for temporary buffers.
3. Use HttpTextWriter when building custom controls.
Ref: Improving .NET Performance and Scalability
Http://www.microsoft.com/practices/
About the Author
You May Also Like