如果在Visual Studio 2008中陈述怪事 [英] If statement weirdness in Visual Studio 2008

查看:143
本文介绍了如果在Visual Studio 2008中陈述怪事的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,这么奇怪,我已经记录我的会议,因为我不认为任何人会相信的我。

I've come across a problem so strange, that I've recorded my session because I didn't think anyone would belive me.

我碰到一个来了错误,这似乎是在非常基础的层面。这是一个单线程的应用程序,所有IM做的是评估一个布尔值。

I came across a bug that seems to be at very fundamental level. This is a single threaded application and all im doing is evaluating a boolean.

布尔等于假,但是,if语句执行的,如果这是真的......有点。你会明白我的意思。我已经清理解决方案,并多次重修。不知道怎么回事。

The boolean equals false, however, the if statement is executing as if it were true...sort of. You'll see what I mean. I've cleaned the solution and rebuilt many times. No idea whats going on.

我喜欢一些解释吧。

http://www.youtube.com/watch?v=ope9kxEyt4g

推荐答案

我已经看到,在过去的许多倍。基本上所发生的事情是,你正在调试的代码不符合您所看到的代码。

I have seen that many times in the past. Basically what is happening is that the code you are debugging doesn't match the code you are seeing.

我不知道是什么原因导致这和解决方案如下货物邪教的准则。

I don't know what causes this and the solution follows cargo-cult guidelines.


  • 的Visual Studio关闭所有副本

  • 删除所有的垃圾桶和对象的文件夹为这个项目

  • 删除所有bin和对象文件夹中的所有.NET项目

  • 删除所有文件哟发现在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET文件

  • Close all copies of Visual Studio
  • Delete all of your bin and object folders for this project
  • Delete all of your bin and object folders for all .NET projects
  • Delete all the files yo find in "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"

这篇关于如果在Visual Studio 2008中陈述怪事的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆