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