Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Date marshalling

$
0
0
Hi,

I can't get it to work, do I need a version more recent that the latest nuget release? (actually I had already tried a class with a valueOf method and it didn't work either)
Your test case prints true but I suspects only because it's the same value and it doesn't actually use valueOf().

Do this one prints true for you?
            engine.AddHostType(typeof(DateTime));
            engine.AddHostType(typeof(DateTimeExtensions));
            Console.WriteLine(engine.Evaluate("a = new DateTime(2016, 1, 1); b = new DateTime(2016, 1, 2); b > a"));
In my tests valueOf never gets called.

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>