开发者

How can I save a "setting" in a C# application?

开发者 https://www.devze.com 2022-12-18 11:33 出处:网络
A user wants me to create an app th开发者_如何转开发at does something everything he presses the X key.

A user wants me to create an app th开发者_如何转开发at does something everything he presses the X key.

Now he asked me to make it so he can change what key he has to press. Maybe he wants X key today, maybe C key tomorrow.

How can I easily do this in C#? What is the best way?


You can use .Net's Application Settings feature.

Go to the Settings tab in Project Properties and add a setting.
You can then access it in code by writing Properties.Settings.Default.MySettingName.

0

精彩评论

暂无评论...
验证码 换一张
取 消