T
Tony Johansson
Hi!
I have this simple program and write 16 character into the file called
test.txt.
If I check the size of the file by using the Length propery on the FileInfo
class
I can see that myLong variable is 16.
If I use a binary Viewer to look at the file test.txt I see that the number
of bytes is 16 with the following Hex values
31 32 33 34 35 36 37 38 39 31 32 33 34 35 36 37
Now to my question but unicode is two bytes.
I have thought that unicode is used but here it's not used because each
charcter is just a single byte and not 2 bytes that unicode is ?
static void Main(string[] args)
{
StreamWriter writer = new StreamWriter("test.txt");
writer.Write("A");
writer.Close();
FileInfo file = new FileInfo("test.txt");
long mylong = file.Length;
}
//Tony
I have this simple program and write 16 character into the file called
test.txt.
If I check the size of the file by using the Length propery on the FileInfo
class
I can see that myLong variable is 16.
If I use a binary Viewer to look at the file test.txt I see that the number
of bytes is 16 with the following Hex values
31 32 33 34 35 36 37 38 39 31 32 33 34 35 36 37
Now to my question but unicode is two bytes.
I have thought that unicode is used but here it's not used because each
charcter is just a single byte and not 2 bytes that unicode is ?
static void Main(string[] args)
{
StreamWriter writer = new StreamWriter("test.txt");
writer.Write("A");
writer.Close();
FileInfo file = new FileInfo("test.txt");
long mylong = file.Length;
}
//Tony