title: Can't find a fix for System.ArgumentNullException: Value cannot be null
body: <p>I'm really new to coding, so I don't know how to fix this error:</p>
  
  <blockquote>
    <p>$mcs *.cs -out:main.exe
    $mono main.exe
    Insert the first number:<br>
    Unhandled Exception:
    System.ArgumentNullException: Value cannot be null.
    Parameter name: String
      at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer&amp; number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00003] in &lt;902ab9e386384bec9c07fa19aa938869>:0 
      at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in &lt;902ab9e386384bec9c07fa19aa938869>:0 
      at System.Int32.Parse (System.String s) [0x00007] in &lt;902ab9e386384bec9c07fa19aa938869>:0 
      at RectangleVolume.Program.Main () [0x0000f] in &lt;0c8d91594f2e4f869d1e8405ed48fd66>:0 
    [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null.
    Parameter name: String
      at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer&amp; number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00003] in &lt;902ab9e386384bec9c07fa19aa938869>:0 
      at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in &lt;902ab9e386384bec9c07fa19aa938869>:0 
      at System.Int32.Parse (System.String s) [0x00007] in &lt;902ab9e386384bec9c07fa19aa938869>:0 
      at RectangleVolume.Program.Main () [0x0000f] in &lt;0c8d91594f2e4f869d1e8405ed48fd66>:0 </p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>using System;
  
    namespace RectangleVolume
    {
      class Program
      {
        static void Main()
        {
          int number1;
          int number2;
          int volume;
          int two;
          int zero;
  
          Console.Write("Insert the first number:  ");
          number1 = int.Parse(Console.ReadLine());
          Console.Write("Insert the second number:  ");
          number2 = int.Parse(Console.ReadLine());
  
          two = 2;
          two = int.Parse(Console.ReadLine());
          zero = 0;
          zero = int.Parse(Console.ReadLine());
  
          if (number1 &lt; zero)
          {
              Console.WriteLine("First number is not a positive");
          }
          else
          {
              Console.WriteLine(number1 * two);
          }
  
          if (number2 &lt; zero)
          {
              Console.WriteLine("second number is not a positive");
          }
          else 
          {
              Console.WriteLine(number2 * two);
          }
  
          volume = number1 + number2;
  
          Console.Write("The Volume is: ");
          Console.WriteLine(volume);
  
          Console.ReadLine();
        }
     }      
  }
  </code></pre>
  
  <p>If anyone knows how to fix the error I would appreciate your help, ty</p>