在 Visual Studio 中查看 var 的类型 [英] See the type of a var in Visual Studio

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

问题描述

有没有办法在 Visual Studio 2013 代码编辑器中查看 var 的类型?

Is there a way to see the type of a var within the Visual Studio 2013 code editor?

当我有一个疯狂的 linq 查询时,很高兴看到结果类型是什么.我不想用实际类型替换 var 关键字,我只想看看它是什么.

When I have a crazy linq query it would be nice to see what the resulting type will be. I don't want to replace the var keyword with the actual type, I just want to see what it is.

推荐答案

您可以通过将鼠标悬停在特定的 var 关键字上来获得它.

You can get it by Hovering on particular var keyword.

例如,在下图中,工具提示显示了详细信息.

For example see in below image the tooltip shows the details.

这篇关于在 Visual Studio 中查看 var 的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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