When I try to compile code on VS 2005 and it fails, the line which causes the error gets underlined blue, and mouse-hovering over it displays the error message. Fine, but you can't see object types or whatever, because Intellisense will show the error message, and not object info.
当我尝试在VS 2005上编译代码并且它失败时,导致错误的行被加下划线蓝色,鼠标悬停在它上面会显示错误消息。很好,但你看不到对象类型或其他什么,因为Intellisense将显示错误消息,而不是对象信息。
In this image, I wanted to see what type DateTime.Subtract()
returns, but VS insists on showing the error message:
在此图像中,我想查看DateTime.Subtract()返回的类型,但VS坚持显示错误消息:
alt text http://img502.imageshack.us/img502/6962/vs2005errordl7.png
替代文字http://img502.imageshack.us/img502/6962/vs2005errordl7.png
Does anyone know how to get the error message out of the way, once you've got enough of it?
一旦你有足够的信息,有没有人知道如何将错误信息排除在外?
5 个解决方案
#1
1
Select "Build|Clean Solution" - this cleans up intermediate files and other things. More importantly, it also clears the list of error messages, restoring normal behaviour of Intellisense.
选择“Build | Clean Solution” - 这将清除中间文件和其他内容。更重要的是,它还清除了错误消息列表,恢复了Intellisense的正常行为。
#2
1
Cut the first part of the line ("DateTime duracao = ") into the clipboard, then you should be able to hover over "Subtract" and see the return type. Not ideal, but I find myself doing it all the time!
将行的第一部分(“DateTime duracao =”)剪切到剪贴板中,然后您应该能够将鼠标悬停在“Subtract”上并查看返回类型。不理想,但我发现自己一直这样做!
#3
0
ctrl-space inside the parens
parens里面的ctrl-space
#4
0
I just found that the equivalent to mouse hovering is View -> IntelliSense -> Quick Info
. If the solution does not arise here, I'll just use the shortcut Ctrl+K, Ctrl+I
.
我刚刚发现相当于鼠标悬停的是View - > IntelliSense - > Quick Info。如果此处没有出现解决方案,我只需使用快捷键Ctrl + K,Ctrl + I.
#5
0
Since duracao is a DateTime, and the error message is 'cannot convert Timespan to DateTime' - you can already see the subtract function is returning a Timespan
由于duracao是一个DateTime,并且错误消息是“无法将Timespan转换为DateTime” - 您已经可以看到减法函数正在返回Timespan
#1
1
Select "Build|Clean Solution" - this cleans up intermediate files and other things. More importantly, it also clears the list of error messages, restoring normal behaviour of Intellisense.
选择“Build | Clean Solution” - 这将清除中间文件和其他内容。更重要的是,它还清除了错误消息列表,恢复了Intellisense的正常行为。
#2
1
Cut the first part of the line ("DateTime duracao = ") into the clipboard, then you should be able to hover over "Subtract" and see the return type. Not ideal, but I find myself doing it all the time!
将行的第一部分(“DateTime duracao =”)剪切到剪贴板中,然后您应该能够将鼠标悬停在“Subtract”上并查看返回类型。不理想,但我发现自己一直这样做!
#3
0
ctrl-space inside the parens
parens里面的ctrl-space
#4
0
I just found that the equivalent to mouse hovering is View -> IntelliSense -> Quick Info
. If the solution does not arise here, I'll just use the shortcut Ctrl+K, Ctrl+I
.
我刚刚发现相当于鼠标悬停的是View - > IntelliSense - > Quick Info。如果此处没有出现解决方案,我只需使用快捷键Ctrl + K,Ctrl + I.
#5
0
Since duracao is a DateTime, and the error message is 'cannot convert Timespan to DateTime' - you can already see the subtract function is returning a Timespan
由于duracao是一个DateTime,并且错误消息是“无法将Timespan转换为DateTime” - 您已经可以看到减法函数正在返回Timespan