.NETGURU
quick watch vs stepping over code...
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcs' list.


Robert Chartier

just a quick test app to see a very misleading difference in the quick
watch/watch list vs actually stepping/running the code

double mydbl=System.Double.NaN;

if(mydbl==System.Double.NaN)mydbl=500;

Console.WriteLine(mydbl);

the watch determines:
name value type
(mydbl==System.Double.NaN) true bool

but actually stepping into it will never evaluate to true

if(mydbl==System.Double.NaN)

and it will never set mydbl=500;

This is the second issue ive found with each returning different
results. how can two things, performing the same operation (evaluation of
expressions) return different results? (the first issue was regarding
loading assemblies from byte[] and reflecting custom attributes)

Robert Chartier
Author and Developer
604-975-5590
Click here to reveal e-mail address
http://www.aspalliance.com/nothingmn/

Reply to this message...
 
    
Joshua Perry
Try:

Double mydbl =3D double.NaN;

if(double.IsNaN(mydbl))
    mydbl =3D 500;

Joshua Perry
1-800 CONTACTS, INC.
Information Systems Developer
(801)924-9828
=20

-----Original Message-----
From: Robert Chartier [mailto:Click here to reveal e-mail address]=20
Sent: Wednesday, July 24, 2002 2:26 PM
To: aspngcs
Subject: [aspngcs] quick watch vs stepping over code...

just a quick test app to see a very misleading difference in the quick=20
watch/watch list vs actually stepping/running the code

double mydbl=3DSystem.Double.NaN;

if(mydbl=3D=3DSystem.Double.NaN)mydbl=3D500;

Console.WriteLine(mydbl);

the watch determines:
name value type
(mydbl=3D=3DSystem.Double.NaN) true bool

but actually stepping into it will never evaluate to true

if(mydbl=3D=3DSystem.Double.NaN)

and it will never set mydbl=3D500;

This is the second issue ive found with each returning different=20
results. how can two things, performing the same operation (evaluation
of=20
expressions) return different results? (the first issue was regarding=20
loading assemblies from byte[] and reflecting custom attributes)

Robert Chartier
Author and Developer
604-975-5590
Click here to reveal e-mail address
http://www.aspalliance.com/nothingmn/

| [aspngcs] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcs.asp =3D JOIN/QUIT

Reply to this message...
 
    
Robert Chartier

i dont need a solution to the issue in the code, that was a quick fix.

i need a solution or an explanation regarding the problem with differences
in the Watch vs actual Stepping over code in VS.NET.

why do both evaluate to different results in more than one situation?

How can we trust vs.net when it behaves in this manner?

At 10:20 AM 7/25/2002 -0600, you wrote:
[Original message clipped]

Robert Chartier
Author and Developer
604-975-5590
Click here to reveal e-mail address
http://www.aspalliance.com/nothingmn/

Reply to this message...
 
 
System.Console
System.Double




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification