HI, 我想动态地使用C#连接字符串。我在XML文件中有本地化的字符串,这个字符串我想在运行时根据语言选择进行更新。
下面我指定了输入字符串和期望的输出字符串格式。字符串连接
EX:
*Input String:*
"The density of your %s gas at reference conditions of %s %s and %s %s is:"
*Expected Output String:*
"The density of your Helium gas at reference conditions of 20.01 g and 15.12 Kg is:"
感谢
也许你想用'{0}','{1}'等等,而不是'%s'。 – kennytm 2010-04-29 17:28:10
这对我来说非常有用。谢谢 – Ravi 2010-04-30 05:49:02
也许现在是时候接受至少几个问题的答案了? – Alex 2010-04-30 14:53:17