Best way to save per user options in C#

后端 未结 5 462
天涯浪人
天涯浪人 2020-12-06 10:35

What is an easy way to save/load settings? I\'d prefer it if each user has their own set of settings.

5条回答
  •  一个人的身影
    2020-12-06 10:52

    This would depend a lot on the type of application.

    If this is a desktop application you could save information into the registry in the user's area. Or into their User directory on disk. If this is a web or server application, you would need to store it into a database keyed by user, or to a disk file named for each user or something.

    Since you mention options, it seems like the client path is more likely.

提交回复
热议问题