我想在C#中对列表(或数组)进行排序,并希望为未排序列表中的每个项目保存新索引.即:
A = 2 3 1 sorted(A) = 1 2 3 indexes = 1 2 0 <-- This is what I need
我在Stack溢出上读到LINQ特别有用,但我找不到具体怎么做.
c# linq arrays sorting list
arrays ×1
c# ×1
linq ×1
list ×1
sorting ×1