C#: password characters for property in Property Grid

To not show your passwords in plain text on a propertygrid, just use the PasswordPropertyText attribute:

[DisplayName("Password"), Category("Authentication"), PasswordPropertyText(true)] 
public string Password 
{ 
   … 
}

Comments

Leave a Reply