DataTable DT = MyDataSet.Tables[0]; foreach(DataColumn DC in DT) { ColumnName[Col] = DC.ColumnName; MaxLength[Col] = DC.MaxLength; Nullable[Col] = DC.AllowDBNull; }But I get an
foreach statement cannot operate on variables of type 'System.Data.DataTable' because System.Data.DataTable' does not contain a definition for 'GetEnumerator', or it is inaccessibleAny workaround? How do I implement GetEnumerator on a DataTable?