title: Converting Persian date to Gregorian date
body: <p>I am trying to convert a specific Persian date to Gregorian with no success. I have tried below code but I get compiler error saying:</p>
  
  <blockquote>
    <p>DateTime does not contain a constructor that takes 4 arguments.</p>
  </blockquote>
  
  <pre><code>using System.Globalization;
  
  DateTime dt = new DateTime(year, month, day, new PersianCalendar());
  </code></pre>
  
  <p>I have also tried below way but I get the same Persian date (obj in below code) that I have passed into <code>ConvertToGregorian</code> function and not the Gregorian date: </p>
  
  <pre><code>public static DateTime ConvertToGregorian(this DateTime obj)
      {
          GregorianCalendar gregorian = new GregorianCalendar();
          int y = gregorian.GetYear(obj);
          int m = gregorian.GetMonth(obj);
          int d = gregorian.GetDayOfMonth(obj);
          DateTime gregorianDate = new DateTime(y, m, d);
          var result = gregorianDate.ToString(CultureInfo.InvariantCulture);
          DateTime dt = Convert.ToDateTime(result);
          return dt;
      }
  </code></pre>
  
  <p>Please note that my <code>CultureInfo.InvariantCulture</code> is English US.</p>