How many times program has run? C#

前端 未结 9 804
情歌与酒
情歌与酒 2020-12-17 02:26

How can I get the number of times a program has previously run in C# without keeping a file and tallying. If it is not possible that way, can it be gotten from the Scheduled

9条回答
  •  [愿得一人]
    2020-12-17 02:45

    int x = Your_Project.Properties.Settings.Default.Counter;
    x++;
    Your_Project.Properties.Settings.Default.Counter = x;
    Your_Project.Properties.Settings.Default.Save();
    

提交回复
热议问题