title: How to enter a default value when a TextBox is empty
body: <p>I have this <code>method</code> which <code>SUM</code> values in those <code>textboxes</code>, I wanted to improve it so if any of these <code>textboxes</code> is <code>empty</code> I would like to insert into it <code>"0"</code> but I didn't knew where to and what exactly put to make it work like I want. I have wondered about this for quiet long time, would someone suggest me something please ?</p>
  
  <pre><code>void vypocti_naklady()
      {
          double a, b,c,d,e,f,g,h;
          if (
              !double.TryParse(p_ub_s.Text, out a) ||
              !double.TryParse(p_poj_s.Text, out b) ||
              !double.TryParse(p_jin_s.Text, out c) ||
              !double.TryParse(p_dop_s.Text, out d) ||
              !double.TryParse(p_prov_s.Text, out e) ||
              !double.TryParse(p_pruv_s.Text, out f) ||
              !double.TryParse(p_rez_s.Text, out g) ||
              !double.TryParse(p_ost_s.Text, out h) 
          )
          {
              naklady.Text = "0";
              return;
          }
  
          naklady.Text = (a+b+c+d+e+f+g+h).ToString();
      }
  </code></pre>
  
  <p>Thanks everyone for their help and time.</p>