C# how to get text value from PasswordBox?
You can get it from the Password
property.
You may extract it from Password
property:
passwordBox.Password.ToString()
If using a MaskedTextbox you can use the .text property. For example:
private void btnOk_Click(object sender, EventArgs e)
{
if ( myMaskedTextbox.Text.Equals(PASSWORD) )
{
//do something
}
}