Program works differently after it's installed on a machine.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been working on a problem which has me totally confused.

My application is checking a collection of objects to see if they have a
difference in one of it's properties. If it does, it's including a list if
different properties in its print-out. If not, it just prints the property
value of the first item.

Now here's my problem. When I'm running it in the IDE, everything works the
way it should work. (Both in release mode and debug mode.) After I install
the app on a machine (mine or anyone else's) it's printing all of the
objects' values in the collection, even when they are the same.

I've tried to uninstall the app from my machine, and then re-install it.
I've also completely removed those lines of code from the app and tried it
that way, just to check that the new versions are getting installed correctly.

When the App is installed in debug mode, it works correctly. If anyone
could help, I'd GREATLY appreciate it!

Richard Olson
 
Radioflyer651 said:
I've been working on a problem which has me totally confused.

My application is checking a collection of objects to see if they have a
difference in one of it's properties. If it does, it's including a list if
different properties in its print-out. If not, it just prints the property
value of the first item.

Now here's my problem. When I'm running it in the IDE, everything works the
way it should work. (Both in release mode and debug mode.) After I install
the app on a machine (mine or anyone else's) it's printing all of the
objects' values in the collection, even when they are the same.

I've tried to uninstall the app from my machine, and then re-install it.
I've also completely removed those lines of code from the app and tried it
that way, just to check that the new versions are getting installed correctly.

When the App is installed in debug mode, it works correctly. If anyone
could help, I'd GREATLY appreciate it!

It would really help if you'd say how this collection of objects is
being created, and what it's being compared with.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
I wish I did this before I posted, but I had the values rounded to 3 place
decimals when it compared the two. It seemes to work. My only question now
is, why do the values differ when I run the program in windows and in the IDE?

Thanks in advance
Richard
 
Radioflyer651 said:
I wish I did this before I posted, but I had the values rounded to 3 place
decimals when it compared the two. It seemes to work. My only question now
is, why do the values differ when I run the program in windows and in the IDE?

Running in debug mode turns off some optimisations. That can affect how
accurately things are stored and compared, often in very surprising
ways.
 
Back
Top