// http://stackoverflow.com/questions/1852837/is-there-a-generic-constructor-with-parameter-constraint-in-c // http://stackoverflow.com/questions/700966/generic-type-in-constructor public T Read <T>() where T : class, new() // new from 1.3 version { do { row_ = dbfTable.GetRow(nextRecNo, false); // Don't throw an exception, returns null if record not found nextRecNo++; } while (skipDeleted && (row_ != null) && row_.deleted); return(DbfTable.Get <T>(row_)); }
public IEnumerator <T> GetEnumerator <T>(bool skipDeleted) where T : class, new() { for (int i = 0; i < this.recCount; i++) { DbfRow row = this.GetRow(i); if (skipDeleted && row.deleted) { continue; } yield return(DbfTable.Get <T>(row)); } }
public T Get <T>() where T : class, new() // new from 1.3 version { return(DbfTable.Get <T>(row_)); }