title: VB.NET compilation error when using nullable boolean? or date? as optional parameter
body: <p>If I have a method that accepts Optional Nullable Dates or Booleans as such:</p>
  
  <pre><code>Public Function GetAll(Optional ByVal publishToDate As Date? = Nothing, _
                         Optional ByVal publishFromDate As Date? = Nothing, _
                         Optional ByVal isDisabled As Boolean? = Nothing) As DataTable
  </code></pre>
  
  <p>And I call this method without passing any parameters :</p>
  
  <pre><code>dt = GetAll()
  </code></pre>
  
  <p>I will get a compilation error when building :</p>
  
  <ul>
  <li><strong>Error  37  compilation failed : '0xC0000005'   vbc : Command line</strong></li>
  </ul>
  
  <p>If i just use optional nullable integers, its fine. But will always raise an error when using Date or Boolean as Nullable Optional parameters. I do not want to overload because I want to use these parameters (and more) as conditions for an SQL WHERE clause.</p>
  
  <p>The strange thing is, I have tested the above in a separate console application and it works fine.</p>
  
  <p>Note - Currently this method resides in its own assembly that is referenced by a website. IDE is VS 2010. Framework 3.5.</p>
  
  <p>Any ideas for a successful build?</p>
  
  <p>Thanks in advance.</p>