Small initialization problem
<p>I need a little help in the below initialization. What's wrong I'm doing below.</p>

<pre><code>DateTimeOffset? dateTimeFrom, dateTimeTo = null;
</code></pre>

<p>I'm getting an error "Use of Unassigned local variable dateTimeFrom".</p>

<p>Also is there any other way to convert nullable DateTime to nullable DateTimeOffset.</p>

<p>What currently I'm doing is:</p>

<pre><code>DateTimeOffset? dateTimeFrom, dateTimeTo = null;
            if (ViewModel.FromDate.HasValue)
                dateTimeFrom = new DateTimeOffset(ViewModel.FromDate.Value);
            if (ViewModel.ToDate.HasValue)
                dateTimeTo = new DateTimeOffset(ViewModel.ToDate.Value);
</code></pre>

<p>But I think there is a better and elegant way to do the above steps also.</p>
