title: Check for negative value with TryParse C#
body: <p>i know there are several threads about this topic, but I didn't find an answer for me. So I check for correct values with <code>double.TryParse</code>, but I also have to check if they're negative:</p>
  
  <pre><code>static void Main(string[] args)
  {
      double radius, hoehe, umfang, volumen, oberfl;
  
      Console.WriteLine("Radius des Zylinders eingeben: ");
  
      while (!double.TryParse(Console.ReadLine(), out radius))
      {
          Console.WriteLine("Wert ist ungültig! Bitte erneut versuchen.");
      }
  
      Console.WriteLine("Hoehe des Zylinders eingeben: ");
  
      while (!double.TryParse(Console.ReadLine(), out hoehe))
      {
          Console.WriteLine("Wert ist ungültig! Bitte erneut versuchen.");
      }
  
      umfang = 2 * Math.PI * radius;
      volumen = Math.PI * Math.Pow(radius, 2) * hoehe;
      oberfl = umfang * (radius + hoehe);
  
      Console.WriteLine("Umfang: {0:f2}", umfang);
      Console.WriteLine("Volumen: {0:f2}", volumen);
      Console.WriteLine("Oberfläche: {0:f2}", oberfl);
  
      Console.ReadKey();
  }
  </code></pre>
  
  <p>First I thought just add it to the while statement, like </p>
  
  <pre><code>while (!double.TryParse(Console.ReadLine(), out radius) &amp;&amp; radius &lt;=0)
  </code></pre>
  
  <p>but this doesn't work. So can you please tell me another possibility, maybe another if statement?</p>