0

This is my setting :

[global::System.Configuration.SettingsDescription("email")]
[global::System.Configuration.DefaultSettingValueAttribute("email@domain.ca")]
public string Login
{
    get {
        return ((string)(this["mylogin"]));
    }
    set {
        this["mylogin"] = value;
    }
}

Properties.Settings.Default.Login gets [DefaultSettingValueAttribute] value for Login.

I don't know how to get [SettingsDescription] value ?

Laminos
  • 69
  • 8
  • 4
    It is an attribute. search how to get a declared attribute from a class/property – Sir Rufo Dec 08 '17 at 18:36
  • 1
    BTW The Value from DefaultSettingsValueAttribute is used to set the default value of the property. You cannot access the value from DefaultSettingsValueAttribute via the property - you never know if it was read from the config file or from the attribute – Sir Rufo Dec 08 '17 at 18:41

0 Answers0