title: Division using Double.TryParse and if-else statement
body: <p>I am new to C# programming and I am trying to perform division between two cell values and put the result in a third cell in Devexpress. My code works fine except when the denominator is <code>0</code>. This gives me an output of Infinity. Below is my attempt at trying to make it output <code>0</code> in the denominator is zero. </p>
  
  <pre><code>private void xrTableCell40_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
  {
     string value;
     bool Isnum;
     double holder;
     string zero;
     value = xrTableCell38.ToString();
     zero = 0.ToString(); 
     Isnum = double.TryParse(value, out holder);
     if(Isnum = true){
        if (holder &gt; 0)
           DoWorkEventArgs}
        else{
           xrTableCell40.Text = zero;};
     holder = Convert.ToDouble(xrLabel135.Summary.GetResult()) / Convert.ToDouble(xrTableCell38.Summary.GetResult());
     string s = string.Format("{0:N2}", holder);
     xrTableCell40.Text = Convert.ToString(s);
  }
  </code></pre>
  
  <p>I need the output to be <code>0.00</code> if the denominator is zero, otherwise it should perform the division and place the result in <code>xrTableCell40</code>.</p>