Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Serialized stream foreign language compatibility

$
0
0

Hello all,

In the past we have had a problem passing bools on the command line (kicking off a child app) because of the OS language setting.  The exported parameter was generated using <bool>.ToString() which did its job into the language of the OS (so in French "false" came out on the command line as "faux").  However, the program being kicked off was looking for "true" or "false", we changed things to fix this problem - lesson learned.

However, now I am wanting to generate a serialized output of a class to be read in by another program.  The question is, since this is the C# serialize function generating the output, is a bool ALWAYS output as "true" or "false" or is it language dependent also?  I can change the variable to a char or short and use appropriate values to specify settings, but I would rather stick to elemental variable types with their values as I need them in the class.

Thanks,

Mitch


Viewing all articles
Browse latest Browse all 31927

Trending Articles



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