开发者

Save user favorites

开发者 https://www.devze.com 2023-02-12 02:43 出处:网络
In my application I need to display items to the user. He can mark some items as favorites. I need to display those differently.

In my application I need to display items to the user. He can mark some items as favorites. I need to display those differently.

How can I save the favorites on the user's computer? I need someth开发者_高级运维ing like a config entry ... but I need to change that as the user add/remove the favorites. Do you think that I should save that in registry ... or on the disk in a separate file?

Does .net offers some support for such situations?

Thanks, Radu


Yes, the .NET Framework makes it very easy to save user-level settings in your application. You should not save them directly to the Registry, and it's not necessary to write code yourself to save the settings to a file. The documentation for this feature can be found here on MSDN.

If you're using C#, there's an excellent introduction here: Using Settings in C#.

If you're using VB.NET, there's an excellent introduction here: Application settings in VB.NET.

0

精彩评论

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