【发布时间】:2018-04-10 07:17:50
【问题描述】:
请参考以下数组,
string[] numArray = {"two","three","one", "seven","nine", "two", "one"};
我们需要按数字排序这个数组,然后返回排序后的数组
string[] output = {"one","one","two","two","three","seven","nine"};
请建议仅使用字符串数组或任何方法的 c# 代码中的最佳逻辑。
【问题讨论】:
-
这对我来说似乎是作业。
-
将数字名称转换为数值,并按数值排序。
-
你尝试了什么,你的代码在哪里?
-
@SENTHILVEL SO 不是“代码编写服务”。
-
我们不会为您编写代码,因为 StackOverflow 不是代码编写服务。