private void WriteEntryType(CgtEntryType entryType) { if (entryCount <= 0) { throw new FileLoadException("No entry pending in this record"); } writer.Write((byte)entryType); }
private void ReadAndCheckEntryType(CgtEntryType expectedEntryType) { CgtEntryType entryType = ReadEntryType(); if (entryType != expectedEntryType) { throw new FileLoadException(string.Format("{0} entry expected, but {1} entry found", expectedEntryType, entryType)); } }