标签: c# visual-studio casting
在我的代码中:
List<int> x = new List<int>(); IEnumerable<object> y = x as IEnumerable<object>;
和y为null,但在Visual Studio的监视和即时窗口中它(2015 Professional和2017 Community)。是什么给了什么?
答案 0 :(得分:3)
这听起来像是表达式求值程序中的一个可能错误 - 如果在“调试选项”中选中“使用旧表达式求值程序”,则“监视”窗口会正常运行。