string和stringbulder c#之间的区别 [英] Difference between string and stringbulder c#

查看:254
本文介绍了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.


A StringBuilder 戴着安全帽,字符串没有。但是说真的......



一个字符串在你连接它时被删除并重新分配,其中一个 StringBuilder 不是。 StringBuilder s效率更高。



BTW,google是免费的,这是一个很容易找到的答案。
A StringBuilder wears a hardhat, a string doesn't. Seriously though...

A string is deleted and reallocated when you concatenate it, where a StringBuilder isn't. StringBuilders 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆