title: c# - Button displaying/hiding password from text box
body: <p>I am currently making a c# application, in which I am using a text box with property <code>PasswordChar</code> - •. However, this text box has a button like the one below:</p>
  
  <p><a href="https://i.stack.imgur.com/HGaWY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HGaWY.png" alt="enter image description here"></a></p>
  
  <p>However, as a student and amateur, I am unable to make an <code>if</code> code for the button, which when pressed, shows or hides the real numbers of the password.
  I think it should be something like this:</p>
  
  <pre><code>private void metroTextBox1_ButtonClick(object sender, EventArgs e)
      {
  
          if (metroTextBox1.PasswordChar='\•') metroTextBox1.PasswordChar = '\0';
          else metroTextBox1.PasswordChar = '\•';
      }
  </code></pre>
  
  <p>but I think I have at least 1 mistake here. </p>
  
  <p>Please, help!</p>