请参阅下面的列表:
string[] Separator = new string[] { "__" };
string[] lines_acc = File.ReadAllLines(accfilePath);
List<string> list_lines_acc = new List<string>(lines_acc);
List<string> list_lines_silver_count = new List<string>();
FileStream fs_ = null;
if (!File.Exists(silver_countfilePath))
{
using (fs_ = File.Create(silver_countfilePath))
{
foreach (string line_acc in list_lines_acc)
{
string[] line_acc_ar = line_acc.Split(Separator, StringSplitOptions.None);
string line_acc_new = line_acc_ar[0] + "__" + line_acc_ar[1] + "__" + line_acc_ar[3] + "__" + line_acc_ar[4] + "__" + "0";
list_lines_silver_count.Add(line_acc_new);
}
File.WriteAllLines(silver_countfilePath, list_lines_silver_count);
}
}
else
{
string[] lines_silver_count = File.ReadAllLines(silver_countfilePath);
list_lines_silver_count = new List<string>(lines_silver_count);
}
我想list_lines_silver_count
按line_acc_ar[4]
部分排序!
那部分是一个字符串,如 -> 325423 -> 意味着我可以将它转换为整数。
我怎么能做这份工作?