RemoveColumn

public static void RemoveColumn(this System.Data.DataTable dt, string columnName)
{
    if (dt != null && !string.IsNullOrEmpty(columnName) && dt.Columns.IndexOf(columnName) >= 0)
    {
        int idx = dt.Columns.IndexOf(columnName);
        dt.Columns.RemoveAt(idx);
        dt.AcceptChanges();
    }
}
Example:
// Consider that dataSetName is the DataSet that contains a DataTable
dataSetName.Tables[0].RemoveColumn("Column12");

Description

Code that allows deleting a column stating the name

Details

Double click on the code to select all.

 

;