Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Sun, 10 Feb 2008 15:14:43 -0500,    group: microsoft.public.vstudio.development        back       


convert enumeration System::DayOfWeek to double   
I am trying to run the line of code below and I am getting an error:

        DateTime::Today.AddDays( DayOfWeek::Saturday - 
DateTime::Today.DayOfWeek )

DateTime::Today.AddDays will return a DateTime value with today's date plus 
the number of days that is passed as parameter of type double. The problem I 
am having is that DayOfWeek is an enumration type that should return an int 
value between 0 for Sunday and 6 for Saturday. However, I was getting 
"cannot convert parameter 1 from 'System::DayOfWeek' to 'double'" error. I 
tried static_cast <double> and it didn't work. Any advise?
date: Sun, 10 Feb 2008 15:14:43 -0500   author:   Mustafa Al Homsi

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us