I fetch all tables from a database using
tables = Utility.DBConnection.GetSchema("Tables", restrictions);
How do I bring the tables in a alphabetical sort order after?
I checked the GetSchema, there is no property to give any sort order.
I want to do later:
foreach (DataRow row in tables.Rows) {}
But I want to have the tables sorted before.
If tables is a DataTable, you can use the DataTable.DefaultView Property to provide a sorted view into the data: