string和stringbulder c#之间的区别 [英] Difference between string and stringbulder c#
本文介绍了string和stringbulder c#之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
string
和 stringbuilder有什么区别
c#?
推荐答案
这里有一个问题的答案; http://www.dotnetuncle.com/difference/41_string_stringbuilder.aspx [ ^ ]
最简单form,基本上stringbuilder在处理字符串连接操作时效率更高。
There is an answer to the question here; http://www.dotnetuncle.com/difference/41_string_stringbuilder.aspx[^]
In its simplest form, basically stringbuilder is more efficient at handling string concatenation operations.
AStringBuilder
戴着安全帽,字符串
没有。但是说真的......
一个字符串
在你连接它时被删除并重新分配,其中一个StringBuilder
不是。StringBuilder
s效率更高。
BTW,google是免费的,这是一个很容易找到的答案。
AStringBuilder
wears a hardhat, astring
doesn't. Seriously though...
Astring
is deleted and reallocated when you concatenate it, where aStringBuilder
isn't.StringBuilder
s are much more efficient.
BTW, google is free, and this is an easily found answer there.
这篇文章比详细介绍了dotnetuncle发布的说明
字符串与StringBuilder(C#) [ ^ ]
This article goes a bit more into the details than the note posted at dotnetuncle
String Vs StringBuilder (C#)[^]
这篇关于string和stringbulder c#之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文