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

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

So far in this series, we’ve learned when we should consider using StringBuilder in our code and learned about the memory overhead of using a StringBuilder. It’s now time to learn how the StringBuilder can “expand” its capacity and support appending string data efficiently. As with the last post, this content is based upon a review of the implementation details of the StringBuilder class and these details may change over time. I have used the current code from .NET 6 while researching this blog post. The design of StringBuilder has changed little in past versions of .NET, so I expect these to remain broadly applicable to earlier .NET versions.

原文地址: https://www.stevejgordon.co.uk/how-does-the-stringbuilder-work-in-net-part-3-how-appending-works-and-the-stringbuilder-expands

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

| 0 收藏 | 0