public FDSChunk(BinaryReader r) { if (r.ReadByte() != 3) { throw new InvalidOperationException("Bad Block Code"); } Number = r.ReadByte(); ID = r.ReadByte(); Name = FTXT.E.GetString(r.ReadBytes(8)); Address = r.ReadUInt16(); int size = r.ReadUInt16(); FileKind = (FileKindE)r.ReadByte(); if (r.ReadByte() != 4) { throw new InvalidOperationException("Bad Block Code"); } Data = r.ReadBytes(size); }
public FDSChunk(BinaryReader r) { if (r.ReadByte() != 3) throw new InvalidOperationException("Bad Block Code"); Number = r.ReadByte(); ID = r.ReadByte(); Name = FTXT.E.GetString(r.ReadBytes(8)); Address = r.ReadUInt16(); int size = r.ReadUInt16(); FileKind = (FileKindE)r.ReadByte(); if (r.ReadByte() != 4) throw new InvalidOperationException("Bad Block Code"); Data = r.ReadBytes(size); }