TynSerial sequences of basic data types (reduction)

TynSerial sequences of basic data types (reduction)

procedure TForm1.ToolButton17Click(Sender: TObject);
var
  serial: TynSerial;
begin
  serial := TynSerial.Create;
  //序列
  serial.WriteString('str', '字符串');
  serial.WriteInteger('int', 123);
  serial.WriteFloat('float', 12.3);
  serial.WriteBool('bool', True);
  serial.WriteDateTime('datetime', Now);
  //还原
  serial.ReadString('str');
  serial.ReadInteger('int');
  serial.ReadFloat('float');
  serial.ReadBool('bool');
  serial.ReadDateTime('datetime');
  serial.Free;
end;

  

Guess you like

Origin www.cnblogs.com/hnxxcxg/p/10972473.html