有两个数组:
string[] a = { "011|张三", "012|李四", "013|王五","014|赵六" };string[] b = { "013","011", "012","014" };
数组a怎么通过数组b的排序,最终得到:
"013|王五","011|张三", "012|李四", "014|赵六"
这样的顺序?
var arr = b.Select(s => a.First(ss => ss.StartsWith(s))).ToArray();