【发布时间】:2012-08-14 17:24:26
【问题描述】:
错误是
'string.String(char[])' 的最佳重载方法匹配有一些无效参数
我的代码:
string reverseValue = new string(
value.Select((c, index) => new { c, index })
.OrderByDescending(x => x.index).ToArray());
【问题讨论】:
-
请记住,反转字符串可能比仅仅切换字符的顺序更复杂。您可能需要考虑 Unicode 代理对、组合字符等。