Saving a TObject to a File

前端 未结 7 1588
无人及你
无人及你 2021-02-04 12:45

How can one save an Object, in its current state, to a file? So that it can immediately be read and restored with all its variables.

7条回答
  •  星月不相逢
    2021-02-04 13:25

    There is a good tutorial here. Keep in mind that you have to have RTTI (run time type information) to save an object at run-time using this approach, so it will only capture published properties of a class.

提交回复
热议问题