11
I have this code:
Int32 i1 = 14000000;
byte[] b = BitConverter.GetBytes(i1);
string s = System.Text.Encoding.UTF8.GetString(b);
byte[] b2 = System.Text.Encoding.UTF8.GetBytes(s);
Int32 i2 = BitConverter.ToInt32(b2,0);;
i2 is equal to -272777233. Why isn't it the input value? (14000000) ?
EDIT: what I am trying to do is append it to another string which I'm then writing to file using WriteAllText