i am having some file names in array list Like, "Form.frm,Form1.frm,Form2.frm,Module.bas,Module23.bas" in the array list i want to make the first item as ".bas" files how can i make it using array list.
First i would suggest to use the strongly typed List<T> instead. You can use Path.GetExtension and Linq's Enumerable.OrderBy:
List<String> files = new List<String>(){ "Form2.frm","Module.bas","Module23.bas" };
var ordered = files.OrderBy(fn => Path.GetExtension(fn));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With