title: if else statement stops at first IF
body: <p>I've got some problems with my code.. C#
  if i run it it stops at the first If statement...</p>
  
  <p>tried and looked for some more answers but diden't find anything that works </p>
  
  <pre><code>       private void Bereken_Click(object sender, EventArgs e)
      {
          // Afmetingen van het het blok
          var PL = int.Parse(EigenML.Text);
          var PB = int.Parse(EigenMB.Text);
          var PH = int.Parse(EigenMH.Text);
  
          // Afmetingen van het stuk
          var L = int.Parse(StukML.Text);
          var B = int.Parse(StukMB.Text);
          var H = int.Parse(StukMH.Text);
          LabelEigenML.Text = PL.ToString();
          LabelEigenMB.Text = PB.ToString();
          LabelEigenMH.Text = PH.ToString();
  
          var L1 = PL / L;
          var B1 = PB / B;
          var H1 = PH / H;
          var T1 = L1 * B1 * H1;
  
          var L2 = PL / L;
          var B2 = PB / B;
          var H2 = PH / H;
          var T2 = L2 * B2 * H2;
  
          var L3 = PL / L;
          var B3 = PB / B;
          var H3 = PH / H;
          var T3 = L3 * B3 * H3;
  
          var L4 = PL / L;
          var B4 = PB / B;
          var H4 = PH / H;
          var T4 = L4 * B4 * H4;
  
          var L5 = PL / L;
          var B5 = PB / B;
          var H5 = PH / H;
          var T5 = L5 * B5 * H5;
  
          var L6 = PL / L;
          var B6 = PB / B;
          var H6 = PH / H;
          var T6 = L6 * B6 * H6;
  
          if (T1 &gt;= T2 &amp;&amp; T1 &gt;= T3 &amp;&amp; T1 &gt;= T4 &amp;&amp; T1 &gt;= T5 &amp;&amp; T1 &gt;= T6) {
              LabelStukML.Text = "Lengte" + L.ToString();
              LabelStukMB.Text = "Breedte" + B.ToString();
              LabelStukMH.Text = "Hoogte" + H.ToString();
              labelTotaal.Text = T1.ToString();
              Console.WriteLine("Should be 1");
          } else if (T2 &gt;= T1 &amp;&amp; T2 &gt;= T3 &amp;&amp; T2 &gt;= T4 &amp;&amp; T2 &gt;= T5 &amp;&amp; T2 &gt;= T6)
          {
              LabelStukML.Text = "Lengte" + L.ToString();
              LabelStukMB.Text = "Hoogte" + H.ToString();
              LabelStukMH.Text = "Breedte" + B.ToString();
              labelTotaal.Text = T2.ToString();
              Console.WriteLine("Should be 2");
  
          } else if (T3 &gt;= T1 &amp;&amp; T3 &gt;= T2 &amp;&amp; T3 &gt;= T4 &amp;&amp; T3 &gt;= T5 &amp;&amp; T3 &gt;= T6)
          {
              LabelStukML.Text = "Breedte" + B.ToString();
              LabelStukMB.Text = "Lengte" + L.ToString();
              LabelStukMH.Text = "Hoogte" + H.ToString();
              labelTotaal.Text = T3.ToString();
  
              Console.WriteLine("Should be 3");
  
  
          }
          else if (T4 &gt;= T1 &amp;&amp; T4 &gt;= T2 &amp;&amp; T4 &gt;= T3 &amp;&amp; T4 &gt;= T5 &amp;&amp; T4 &gt;= T6)
          {
              LabelStukML.Text = "Breedte" + B.ToString();
              LabelStukMB.Text = "Hoogte" + H.ToString();
              LabelStukMH.Text = "Lengte" + L.ToString();
              labelTotaal.Text = T4.ToString();
              Console.WriteLine("Should be 4");
  
  
          }
          else if (T5 &gt;= T1 &amp;&amp; T5 &gt;= T2 &amp;&amp; T5 &gt;= T3 &amp;&amp; T5 &gt;= T4 &amp;&amp; T5 &gt;= T6)
          {
              LabelStukML.Text = "Hoogte" + H.ToString();
              LabelStukMB.Text = "Breedte" + B.ToString();
              LabelStukMH.Text = "Lengte" + L.ToString();
              labelTotaal.Text = T5.ToString();
              Console.WriteLine("Should be 5");
  
  
          }
          else if (T6 &gt;= T1 &amp;&amp; T6 &gt;= T2 &amp;&amp; T6 &gt;= T3 &amp;&amp; T6 &gt;= T4 &amp;&amp; T6 &gt;= T5)
          {
  
              LabelStukML.Text = "Hoogte" + H.ToString();
              LabelStukMB.Text = "Lengte" + L.ToString();
              LabelStukMH.Text = "Breedte" + B.ToString();
              labelTotaal.Text = T6.ToString();
              Console.WriteLine("Should be 6");
  
          }
          else
          {
  
              LabelStukML.Text = "Error";
              LabelStukMB.Text = "Error" ;
              LabelStukMH.Text = "Error";
              labelTotaal.Text = "Error";
              Console.WriteLine("Should be 6");
  
          }
  
  
  
  
  
  
  
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>It Should calculates sometings, then it looks to what is the biggest and print those things in a specific order, But i always get the Output of my first IF statement</p>