I’m just wondering why it’s Settings.Default.<mysetting> instead of just Settings.<mysetting>?
I’m just wondering why it’s Settings.Default.<mysetting> instead of just Settings.<mysetting> ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply put: because
Settingsis a class, and the properties are instance properties. So you need an instance, and the default way of creating an instance is through theDefaultproperty.The obvious followup question is why the properties aren’t just static to start with… and I surmise that the answer is that it’s useful to be able to create settings in ways other than with the default settings load/save approach… for example, loading them from a database, or from a different file path.