title: String '10/8/2020' was not recognized as a valid DateTime
body: <pre class="lang-cs prettyprint-override"><code>using System;
                      
  public class Program
  {
      public static void Main()
      {
          Console.WriteLine(DateTime.ParseExact(&quot;10/8/2020&quot;,&quot;dd/MM/yyyy&quot;, null));
      }
  }
  </code></pre>
  <p>Returns the error</p>
  <pre><code>Run-time exception (line 7): String was not recognized as a valid DateTime.
  
  Stack Trace:
  
  [System.FormatException: String was not recognized as a valid DateTime.]
     at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
     at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
     at Program.Main() :line 7
  </code></pre>
  <p>Not sure why this problem occurs. Can someone please shed some light?</p>