IEnumerator <SqlDataRecord> IEnumerable <SqlDataRecord> .GetEnumerator() { SqlDataRecord sdr = new SqlDataRecord( new SqlMetaData("KeyField", SqlDbType.SmallInt), new SqlMetaData("Description", SqlDbType.VarChar, 20), new SqlMetaData("DisplayOrder", SqlDbType.SmallInt), new SqlMetaData("OKToDelete", SqlDbType.Bit), new SqlMetaData("UpdateYN", SqlDbType.Bit), new SqlMetaData("DeletedYN", SqlDbType.Bit)); foreach (EnrollmentType i in this) { sdr.SetSqlInt16(0, i.KeyField); sdr.SetString(1, i.Description); sdr.SetSqlNullableInt16(2, i.DisplayOrder); sdr.SetBoolean(3, i.OKToDelete); sdr.SetBoolean(4, i.UpdateYN); sdr.SetBoolean(5, i.DeleteYN); yield return(sdr); } }