I have a simple console application that runs daily (called by the Windows Task Scheduler) and depends on the value that increases every time the application starts. To save this value, I decided to use the Settings.Settings file.
So, I have an integer value called RunNumber with a user area that increments every time the application ends:
Properties.Settings.Default.RunNumber++;
Properties.Settings.Default.Save();
Part of the reason I chose this is because the value is also placed in the app.config file:
<setting name="RunNumber" serializeAs="String">
<value>0</value>
</setting>
This means that if the RunNumber should suddenly increase, it can simply be changed in app.config:
<setting name="RunNumber" serializeAs="String">
<value>10</value>
</setting>
, , RunNumber, , app.config( 10). , , , , , 1 10, .
RunNumber :
Properties.Settings.Default.RunNumber
RunNumber ? , , app.config , .