Listing 21. Set the StringBuilder message.
清单21.设置StringBuilder消息。
Listing 20. Get the StringBuilder message.
清单20 .获取StringBuilder消息。
Maybe I want to use a StringBuilder to get better performance.
也许我想使用一个StringBuilder来获得更好的性能。
If you know you are going to build up a string in a single thread, use StringBuilder.
如果知道要在单线程中构建字符串,就使用StringBuilder。
You can obviously just use a StringBuilder or something similar to create an XML string.
显然,您可以只使用一个StringBuilder来创建xml字符串。
I also wanted to see if the optimizations would have any effect on StringBuilder performance.
我也想了解一下各种优化是否真的能够影响StringBuilder的性能。
The purpose of using the unsynchronized StringBuilder was to provide a baseline measurement of performance.
之所以使用非同步的StringBuilder,是为了提供一个测量性能的基线。
StringBuilder; one is immutable and changes to it cause the creation of a new copy, the other allows for in-place modification.
一个是不可变的,当需要修改的时候它会创建一个新的副本,而另一个则允许直接在其上进行修改。
Does it make sense to use ropes to compute the value of x, rather than a StringBuilder, which is what the compiler generates by default?
用rope代替编译器默认生成的StringBuilder来计算x的值是否有意义?
Note the StringBuilder and the appending of data, used because a particular data element can be processed across multiple reads on the InputSource.
注意,使用StringBuilder和附加数据是因为一个特定数据在InputSource上能通过多个读取来进行处理。
If you want to get the value of Pi to 10 digits of precision, the code in Listing 3 will put that value into the StringBuilder and print the output.
如果希望得到精度为10位数字的pi值,清单3中的代码会将这个值放到StringBuilder中并打印输出。
In part one of this article we used a single threaded benchmark to compare the performance of the synchronized StringBuffer to the unsynchronized StringBuilder.
在本文的第一部分中,我们通过一个单一线程的基准,比较了同步的StringBuffer和非同步的StringBuilder之间的性能。
The StringBuilder class in the System.Text namespace joins strings together without allocating a new string instance each time; this efficiency greatly improves memory utilization.
Text命名空间中的StringBuilder类无须每次分配新的字符串实例即可将字符串连接在一起;这一效率大大改进了内存的利用。
It has two other internal variables, a currentMessage for a Message instance that is being parsed, and a StringBuilder variable called builder that stores character data from text nodes.
它有另外两个内部变量,currentMessage 针对被解析的Message实例,以及名称为builder 的StringBuilder变量,用于存储文本节点中的字符数据。
It has two other internal variables, a currentMessage for a Message instance that is being parsed, and a StringBuilder variable called builder that stores character data from text nodes.
它有另外两个内部变量,currentMessage 针对被解析的Message实例,以及名称为builder 的StringBuilder变量,用于存储文本节点中的字符数据。
应用推荐