Culture-Sensitive C# Method
using System.IO
public static void Write(bool value);
public static void Write(char value);
public static void Write(char[] buffer);
public static void Write(decimal value);
public static void Write(double value);
public static void Write(int value);
public static void Write(long value);
public static void Write(Object value);
public static void Write(float value);
public static void Write(string value);
public static void Write(uint value);
public static void Write(ulong value);
public static void Write(string format, Object arg0);
public static void Write(string format, params Object[] arg);
public static void Write(char[] buffer, int index, int count);
public static void Write(string format, Object arg0, Object arg1);
public static void Write(string format, Object arg0, Object arg1, Object arg2);
public static void Write(string format, Object arg0, Object arg1, Object arg2, Object arg3);
Internationalization (I18n) Method Overview
The Write method writes the text representation of the specified value or values to the standard output stream.
For more information see Microsoft's
MSDN online documentation.
I18n Issues
The Write method relies on a user's system to be set up correctly and being able to properly display the contents passed through the parameters. There is no guarantee that for example Japanese characters will show up uncorrupted in the console for a North American or European user.
Write(Boolean) - Since this will write a text representation of the boolean value to the console, there is an inherent translation problem here. The recommended fix is to pass in the translated values for 'True' or 'False' instead.
Write(Single) and Write(double) both rely on the locale being set correctly. For example, if Locale is not taken into account, problems are likely to arise with decimal commas vs decimal periods.
C# Encoding Information
|