How come line 1 will output garbage to the screen, but line 2 will output a
good number to a file?

How can I make line 1 out put a good number to the screen







String* dayStr = System::DateTime::Now.ToString("dd");

Int32 dayInt = System::Int32::Parse(dayStr);

Console::WriteLine("the day is {0}", __box(dayInt) ); // Line 1



.

.

.





String* path = new String("_1D.txt"); // will read the time from a file

FileStream * fs = new FileStream(path, FileMode::Open);

BinaryReade* br = new BinaryReader(fs);

Int32 day = br->ReadInt32();



fs = new FileStream(S"_1k.txt", FileMode::Create); //will write the time to
another file

BinaryWriter* bw = new BinaryWriter(fs);

Br->Write( day);
//Line 2