title: Dont' use default value for double
body: <p>Using C# in ASP.NET, I want to take the result of two text fields, add them when a button is pressed, and display the result. However, if one or both of the fields are empty, I don't want any result shown.</p>
  
  <p>Right now I keep getting 0 as the result if both fields are empty. I'm pretty sure this is because the two input numbers (doubles) are being assigned a default 0. How can I check for empty fields?</p>
  
  <p>This is my method in my controller.</p>
  
  <pre><code>    [HttpPost]
      public ActionResult French(FrenchModel model, string returnUrl)
      {
  
          switch (model.operation)
          {
              case 1:
                  model.result = model.numberOne + model.numberTwo;
                  break;
              case 2:
                  model.result = model.numberOne - model.numberTwo;
                  break;
              case 3:
                  model.result = model.numberOne * model.numberTwo;
                  break;
              case 4:
                  model.result = model.numberOne / model.numberTwo;
                  break;
          }
  
  
          return View(model);
      }
  </code></pre>