title: c# SIMPLE factorial program
body: <pre><code>private void button1_Click(object sender, EventArgs e)
  {
          String UserNumber = this.textBox1.Text;
          int NewUserNumber = Convert.ToInt32(UserNumber);
          int result = 0;
          int second = 0;
  
          while (NewUserNumber &gt;= 1) 
          {
  
              result = NewUserNumber * (NewUserNumber - 1);
              NewUserNumber--;
          }
          String i = Convert.ToString(result);
          this.textBox2.Text = i;
      }
  }
  </code></pre>
  
  <p>While I understand this is homework for me, I am stuck. I really really don't want this solved, I want to do it myself.</p>
  
  <p>I don't understand why it's not working.. It's outputting 2 no matter what I put in.</p>
  
  <p>I could do this in Java easily but the converting gets to me..</p>
  
  <p>Any help would be great.</p>