[Solved] How can i sort array: string[]?


You can try the following

string[] strarr = new string[] { @"c:\temp\newimages\Changed_Resolution_By_10\SecondProcess_-Width = 502 Height = 502\animated502x502.gif", @"c:\temp\newimages\Changed_Resolution_By_10\SecondProcess_-Width = 492 Height = 492\animated492x492.gif", @"c:\temp\newimages\Changed_Resolution_By_10\SecondProcess_-Width = 2 Height = 2\animated2x2.gif" };
IEnumerable<string> strTest = strarr.OrderByDescending(p => p.Substring(p.IndexOf("x"), p.Length - p.IndexOf(".")));

solved How can i sort array: string[]?