Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在字符串的最后一个字符之前放一个逗号。
例如:
输入:101919 = 输出:10191,9
最好的方法是什么?
if (input.Length > 0) { input = input.Insert(input.Length - 1, ","); }
用插入法
strTarget = strTarget.Insert( srtrTarget.Length -1, ",");