Home

Resolution failed because no accessible 'DateDiff' can be called without a narrowing conversion

edited July 2012
When the following VB Expression is executed in LinqPad...

microsoft.visualbasic.DateDiff(microsoft.visualbasic.DateInterval.Minute, "1900-01-01", Now)

...the following error is issued:

Overload resolution failed because no accessible 'DateDiff' can be called without a narrowing conversion:

By adding a "cdate", the error goes away:

microsoft.visualbasic.DateDiff(microsoft.visualbasic.DateInterval.Minute, cdate("1900-01-01"), Now)

My VB code does not require the CDate. I like to be able to pull snippets from my VB code to run in LinqPad but I don't like making changes to the code to get it to work.

Is there an option or something that can be set in Linqpad to get it to work without the cdate?


Comments

Sign In or Register to comment.