What method can be used to change the index of an existing column in a datatable?
What method can be used to change the index of an existing column in a datatable?
To change the index of an existing column in a datatable, the method used is SetOrdinal. This method allows you to set a column to a specified ordinal or position within the datatable. For instance, dt_Result.Columns("Department").SetOrdinal(0) would move the 'Department' column to the first position.
Answer B - SetOrdinal. For example: dt_Result.Columns("Department").SetOrdinal(0)