Home > Net >  C # form in the program Settings. The Settings file stored in the data is stored in there?
C # form in the program Settings. The Settings file stored in the data is stored in there?

Time:09-27

Such as: Settings. The Settings file configuration data, at the time of development, set up the Settings. The Settings in the file value, could be found in the configuration file, but I will configure file deletion, program the first run was able to get to the configuration data, user can also be saved to the users. The config file, the most began to set the value of the deposit to where go to?

CodePudding user response:

Directly to the DLL's resources section

CodePudding user response:

Should delete after you compile again, wouldn't take it

CodePudding user response:

Research today afternoon, the default data is written to death in the generated code, if the change range of the customer's property, generates a configuration file, find it rather easy to use, tried it on, can be stored List Types of data, and can be read, very useful,

CodePudding user response:

You can customize a class inherits and ApplicationSettingsBase class. The effect of the Settings file is the same,

CodePudding user response:

 
[global: : System. The Configuration. UserScopedSettingAttribute ()]//specified application Settings or attributes for each user of the application contains different values, unable to inherit such,
[global: : System. The Configuration. ApplicationScopedSettingAttribute ()]//application Settings specified attribute is applicable to all users of the application of public value, unable to inherit such,
[global: : System. The Configuration. DefaultSettingValueAttribute (" AppString ")]//set the default value is

CodePudding user response:

Bosses, how to save the value of the load

CodePudding user response:



refer to 6th floor weixin_45143704 response:
, how to preserve the value of the load out
directly from the Properties. The Settings. The Default value object inside,

CodePudding user response:

I'm grows a new one, is there any relevant documents, document content rarely the club's official website, there is no specific instance, could you please forward a, thank you

CodePudding user response:

refer to the eighth floor weixin_45143704 response:
I'm sprout new one, do you have any relevant documents, the document content rarely, the club's official website also does not have the concrete instance, could you please forward a, thank you

Official: https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/application-settings-architecture

CodePudding user response:

reference wqq1027 reply: 3/f
research today afternoon, the default data is written to death in the generated code, if the change range of the customer's property, generates a configuration file, find it rather easy to use, tried it on, can be stored List Types of data, and can be read, very useful,


The original poster hello, I'm a small white novice, recently in a program, using c # winform do,
Want to the problems is, the user will be hoping to line up in a closed software set up before their own device name, this in System. The Configuration of public override void the Save (); Has achieved, now the problem is, customers hope to uninstall the software, to bring the device name before he set to also know that
That is to say if uninstall reinstall the software, first open software, device name back to the initial value,
Excuse me, how to achieve this?
  •  Tags:  
  • C#
  • Related