c# winforms TextBox的记忆功能

1:在项目上点右键  sproperties-settings 添加项目 如 MyText  类型 String

2: 获取值:   string loginId = Properties.Settings.Default.MyText;

3:保存值:在Formclosing中

            Properties.Settings.Default.MyText =  UserID.ToString();

            Properties.Settings.Default.Save();

原文地址:https://www.cnblogs.com/wenjie/p/1931216.html