Equivalent of sizeof() in Javascript?

Hey all,

A simple question really. I am doing to byte array manipulation and come from a C# background where I make heavy use of the sizeof() function to calculate the size of different datatypes (int, float etc). However, I am using Javascript at the moment, and there doesn’t seem to be an equivalent. I would be extremely grateful if someone would point me in the right direction.

Thanks in advance,

Wibbs

The book of dirty black arts told me that System.Runtime.InteropServices.Marshal.SizeOf(…) works on platforms where its available.

What do you mean when you say ‘where its available’? Are there many circumstances where it would not be?

I’ve not tested it in the webplayer.
The webplayer has no native code support as such the InteropServices among a few other namespaces are limited and you would have to test if it works.

Cool - thanks for the quick response.