title: "Use of unassigned variable" -- work arounds?
body: <p>Now I've long known and been use to this behavior in C#, and in general, I like it. But sometimes the compiler just isn't smart enough.</p>
  
  <p>I have a small piece of code where right now my workaround isn't a big problem, but it could be in similar cases. </p>
  
  <pre><code>        bool gap=false;
          DateTime start; // = new DateTime();
          for (int i = 0; i &lt; totaldays; i++)
          {
              if (gap)
              {
                  if (list[i])
                  {
                      var whgap = new WorkHistoryGap();
                      whgap.From = start; //unassigned variable error
                      whgap.To = dtFrom.AddDays(i);
                      return whgap;
                  }
              }
              else
              {
                  gap = true;
                  start = dtFrom.AddDays(i);
              }
          }
  </code></pre>
  
  <p>The problem I'm seeing is what if you had to do this with a non-nullable struct that didn't have a default constructor? Would there be anyway to workaround this if <code>start</code> wasn't a simple DateTime object?</p>