【发布时间】:2017-10-06 15:09:27
【问题描述】:
我已经看到很多关于对分隔的制表符进行排序的主题,但是我无法掌握或理解完成这段代码的任务,而且我刚刚开始使用 C#。我希望有人能回答这个问题。
我想打开一个由特定数量的字段分隔的制表符的文本文件。问题是如何使用第一列字段对其进行排序,然后使用第二列。如果可能的话,我希望能够查看列表数组中的字段以进行调试。我希望这个示例以制表符分隔。 那我当然希望能把它写回来。
Category Name Category Sub Name Family Sales Description Equipment Tag List Price Price ID
Fixture Type 2 Basket Sales B2 65 64 366589
Fixture Type 2 Basket Sales B2 65 64 366595
Fixture Type 2 Basket Sales B2 65 64 366601
Fixture Type 2 Basket Sales B2 65 64 366607
Fixture Type 2 Basket Sales B2 65 64 366613
Fixture Type 22 Rail Sales X1 10 10 382822
Device Type 1 Wall Outside Null 360 342 400604
Device Type 3 Standard Outside Null 180 171 400885
Device Type 1 Wall Outside Null 360 342 400965
Device Type 1 Wall Outside Null 360 342 401034
Device Type 1 Wall Outside Null 360 342 401303
Device Type 3 Standard Standard Null 180 171 401471
Device Type 1 Wall Outside Null 360 342 401596
Device Type 3 Standard Standard Null 180 171 401753
Device Type 3 Standard Standard Null 180 171 401866
Device Type 1 Wall Outside Null 360 342 402189
Device Type 3 Standard Standard Null 180 171 402537
Device Type 1 Wall Outside Null 360 342 402685
Device Type 1 Wall Outside Null 360 342 402930
Device Type 1 Wall Outside Null 360 342 402952
Device Type 3 Standard Standard Null 180 171 403164
Device Type 1 Wall Outside Null 360 342 403234
Device Type 3 Standard Standard Null 180 171 403303
Device Type 1 Wall Outside Null 360 342 403473
Fixture Type 4 Standard Null F1 140 137 406101
Fixture Type 4 Step Null F1 140 137 406102
Fixture Type 4 Step Null F1 140 137 406103
Fixture Type 4 Step Null F1 140 137 406104
Fixture Type 4 Step Null F1 140 137 406105
Fixture Type 4 Step Null F1 140 137 406106
Fixture Type 4 Step Null F1 140 137 406124
Fixture Type 4 Step Null F1 140 137 406125
Fixture Type 4 Step Null F1 140 137 406126
Fixture Type 4 Step Null F1 140 137 406127
Fixture Type 4 Step Null F1 140 137 406128
Fixture Type 4 Step Null F1 140 137 406129
【问题讨论】:
-
您不能只要求别人为您完成工作。到目前为止,您尝试了哪些对您不起作用的方法?您是否在某个地方寻找过一些您尝试过但没有奏效的解决方案?
-
我明白你在说什么。好点子。我似乎无法在此处发布任何编码的示例,我已经在此搜索了几天。
-
这是一个常见的谷歌搜索,我回来的所有结果都没有提供任何似乎适合我的情况的解决方案。 "读取和排序一个 csv c#"