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

New Post: Date marshalling

$
0
0
Hello!

Unfortunately valueOf isn't used to prepare values for equality comparison, nor is it possible for the host to overload JavaScript operators. And as you probably know, comparing structs by reference doesn't even work for managed code :)

ClearScript does have a scheme in place that makes JavaScript equality comparison work for .NET enum values. It's somewhat memory intensive, but that's offset by the tiny value range of most enums. In theory the same technique could work for other value types, but currently it's enabled only for enums due to memory consumption concerns.

Thanks!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



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