你的位置: 码友网首页 / 资讯源列表 / How Does the StringBuilder Work in .NET? (Part 1)

关于[How Does the StringBuilder Work in .NET? (Part 1)]的摘要:

After becoming proficient in .NET and C#, developers are likely to learn that they should use a StringBuilder to optimise string manipulation and concatenation. This is not a hard and fast rule for all situations but is generally good advice if your code combines or modifies strings repeatedly, particularly if the number of modifications is unbounded and not known until runtime. In this post, I want to begin a series of posts that I hope will be useful to developers looking to understand why this advice exists and how the StringBuilder is implemented to support more efficient string manipulation. Today, we will focus on understanding the problem that the StringBuilder class is designed to solve and when it makes sense to use it in our code.

原文地址: https://www.stevejgordon.co.uk/how-does-the-stringbuilder-work-in-dotnet-part-1

收录时间: 2021-07-07 浏览量: 965 分类: .NET

| 0 收藏 | 0