Use of unassigned local variable when variable will always be assigned
<p>The code below (that will not be production code) will not compile because of an <code>Use of unassigned local variable 'dateTime'</code> Looking at it I can tell that the variable would never be unassigned at return time. Returning an out parameter in an Any clause is bad form, but why can't it compile?</p>

<pre><code> private static DateTime? ConvertStringToDateByFormat(string date) {
     DateTime dateTime;

     var acceptableDateFormats = new List&lt;String&gt;{
        "d/MM/yyyy",
        "d/M/yyyy",
        "d/MM/yy",
        "d/M/yy",
        "d-MM-yyyy",
        "d-M-yyyy",
        "d-MM-yy",
        "d-M-yy",
        "d.MM.yyyy",
        "d.M.yyyy",
        "d.MM.yy",
        "d.M.yy",
        "d-MMM-yyyy",
        "d-MMM-yy",
        "d MMM yyyy",
        "d MMM yy"
     };

     if (acceptableDateFormats.Any(format =&gt; DateTime.TryParseExact(date, format, CultureInfo.CurrentCulture, DateTimeStyles.None, out dateTime))) {
        return dateTime;   
     }
     else {
        return null;
     }

  }
</code></pre>
