Exam UiADPv1 All QuestionsBrowse all questions from this exam
Question 21

What method can be used to change the index of an existing column in a datatable?

    Correct Answer: B

    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.

Discussion
IngvarnOption: B

Answer B - SetOrdinal. For example: dt_Result.Columns("Department").SetOrdinal(0)