title: Reusing multiplication logic for textboxes in c#
body: <p>I have  60 textboxes. Three in each row. For each of the twenty rows I am mutiplying the first two textboxes and storing the value in the third textbox.
  I have created a simple logic for multiplying the values in two textboxes and storing the value in the third textbox.
  Unfortunately this logic needs to be pasted twenty times. Is there a way to reuse the same logic for each row.
  Any help will be much appreciated!</p>
  
  <pre><code>private void Multiplication()
      {
          int a;
          float b;
          if (BoxA.Text != "")
              {
              a= Convert.ToInt32(BoxA.Text);
              }
          else
              {
              a = 0;
              }
          if (BoxB.Text != "")
              {
              b = Convert.ToSingle(BoxB.Text);
              }
          else
              {
              b= 0;
              }
  
          float c= a* b;
          BoxC.Text = mult.ToString();
  
      }
  </code></pre>