How to auto save and auto load all properties in winforms C#?

后端 未结 4 656
面向向阳花
面向向阳花 2020-12-17 06:12

How to auto save all properties winforms when closed and auto load all properties winforms when load ? C#

using System;
using System.Collections.Generic;
us         


        
4条回答
  •  旧巷少年郎
    2020-12-17 06:39

    The process of turning objects like forms into something that could be saved is called serialization. Unfortunately I don't think there's an out-of-box way to serialize forms in WinForm. I did find How to Clone/Serialize/Copy & Paste a Windows Forms Control, and since forms are also controls, you might be able to serialize the properties using the code.

提交回复
热议问题