DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 20 Jul 2007 16:23:13 -0700,    posted on: microsoft.public.dotnet.framework.performance        back       

Thread Index
  1    Allen Maki


using boxing may put garbage into the screen   
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
Date:Fri, 20 Jul 2007 16:23:13 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us