[Mono-list] Marshal.SizeOf on Char Type Variations Between Platforms

Brian Kesecker bkesecker at augustasystems.com
Tue May 11 11:42:12 EDT 2010


If the following evaluated (VB code):

System.Runtime.InteropServices.Marshal.SizeOf(GetType(Char))

A test application returns 1 running under Windows (specifically 32-bit 7
Pro) and 2 running under Linux (specifically openSuSE 11.2 Mono 2.6.4). 
Logically, I would think that 2 should be correct, since Unicode characters
are two bytes in size.  However, I'm thinking there may be something I'm
missing, like a default project encoding option, or something to that
effect.

This doesn't cause me any problems since I know about it, but I'll want to
know about when the functionality changes in the future... which it should?
and should by MS?

Comments welcome.

-----
Brian Kesecker, Software Developer,  http://www.augustasystems.com/ Augusta
Systems, Inc. 
-- 
View this message in context: http://mono.1490590.n4.nabble.com/Marshal-SizeOf-on-Char-Type-Variations-Between-Platforms-tp2174008p2174008.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list