コード例 #1
0
        public override void ReadAndWrite()
        {
            using (BinaryReader reader = new BinaryReader(File.Open(FileName, FileMode.Open)))
            {
                while (reader.BaseStream.Position != reader.BaseStream.Length)
                {
                    TradeRecord record = new TradeRecord
                    {
                        id      = reader.ReadInt32(),
                        account = reader.ReadInt32(),
                        volume  = reader.ReadDouble(),
                        comment = reader.ReadString()
                    };

                    Result.WriteRecord(record);
                }
            }
        }
コード例 #2
0
 public override void WriteRecord(TradeRecord record)
 {
     File.AppendAllText(FileName, record.ToCsvString());
 }