不应使用它取代简单的字符串连接。
It should generally not be used merely as a replacement for simple string concatenation. For example.
多聪明的编译器优化字符串连接。
How smart is the compiler at optimizing string concatenation.
为什么我的使用有一个查询字符串连接?
然后使用字符串连接创建完整的、结构良好的XML文档。
It then USES string concatenation to create a complete, well-formed XML document from it.
使用参数化查询或存储过程来访问数据库,而不是使用字符串连接。
Use parameterized queries or stored procedures to access a database as opposed to using string concatenation.
下表是用于连服务器字符串连接接池中比较重要的关键字和其描述。
Below is the table with important connection Pooling specific keywords of the connection strings with their description.
您还看到从C 语言带来的简化,其中包括字符串连接、关联数组元素和合并操作符。
You'll also find some simplifications from C, which include string concatenation, associative array elements, and aggregation operators.
返回到清单14,在拥有条目列表之后,使用某个简单的字符串连接来创建XML文档。
Going back to Listing 14, once we have the list of entries, we then use some simple string concatenation to create an XML document.
例如,在事件处理程序中,可以对随异步请求一同传递的数据执行计算或字符串连接操作。
For example, within the event handler, calculation can be performed or strings concatenated for data sent along with the asynchronous request.
例如,如果一个数字用在一个字符串连接表达式中,数字就会先转换为字符串。
If a number is used in a string concatenation expression, for example, the number is converted to a string first.
我们并没有使用WCF提供的统一编程模型,而且URL也是通过字符串连接搞出来的。
We are not using the unified programming model offered by WCF and the URL is hacked together using string concatenation.
print指令发出标准输出(stdout)的参数,且concat实现字符串连接。
The print instruction emits the argument to standard output (stdout), and concat implements string concatenation.
原生字符串连接函数接受任意数目的参数,并将每一个参数都追加在调用函数的字符串上。
The native string concat method accepts any number of arguments and appends each to the string that the method is called on.
如果你需要把多个字符串连接起来,最好是把他们做成一个数组,然后调用join方法实现这个操作。
But if you have multiple string concatenations, prefer pushing to an Array and then calling the join method on it.
注意,使用简单的字符串连接构造XML文档一般来说比较危险(参考资料中的一篇文章解释了这一点)。
Be aware that simple string concatenation can be a dangerous way to construct XML documents in general (see Resources for an article that expands on this point).
甚至这还不够,因为XSL能够轻易地将字符串连接起来,因此表示图像的最终字符串可能位于多个位置。
Even that can be incomplete since XSL can easily append strings together, so the final string representing the image may not be found in one piece.
如果不喜欢使用这么长的字符串连接语句,另一种方法是使用字符串格式操作符,可以使用下面这样的表达式。
If you prefer not to use a long string concatenation statement like this, an alternative is to use the string formatting operator which enables you to have an expression like.
所以,在字符串上的任何操作,包括字符串连接,都产生一个新的字符串对象,而不是更改一个存在的字符串。
Therefore, any operation on a string, including string concatenation, produces a new string object, rather than modifying an existing one.
Text命名空间中的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类无须每次分配新的字符串实例即可将字符串连接在一起;这一效率大大改进了内存的利用。
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.
应用推荐