public Table(string dBaseFileName, ref Table tToWatch) { vHeader = new VisibleHeaderData(); byte[] bData = GetFileData(dBaseFileName); tHeader = new HeaderData(bData, ref vHeader, ref tToWatch); rRecords = new Record[vHeader.nOfRecords]; sFieldNames = vHeader.sFieldNames; string[,] sTable = new string[vHeader.nOfRecords, vHeader.nOfFields]; ReadContentsOfFields(ref sTable, bData, vHeader); sFileName = dBaseFileName; for (int i = 0; i < rRecords.Length; i++) { string[] toShoveInRecord = new string[vHeader.nOfFields]; for (int x = 0; x < vHeader.nOfFields; x++) { toShoveInRecord[x] = sTable[i, x]; } rRecords[i] = new Record(toShoveInRecord, vHeader.nFieldLength); } }
public QuickTable(string dbfName) { sFileName = dbfName; bFileContents = LoadDataFromFile(sFileName); tHeader = new HeaderData(bFileContents, ref vHeader); }