Why on Debug some field are “missing”?

蓝咒 提交于 2021-01-28 05:09:34

问题


If I wrote:

IList<Video> videoContainer = videos.ToList();
DateTime theData = videoContainer.First().YouTubeEntry.Published;

the code works perfectly. But if I go in Debug mode and I analyze videoContainer expanding the fields, I can't see that field Published.

Why?


回答1:


It works a lot easier when you grab the item of interest first

IList<Video> videoContainer = videos.ToList();
var entry = videoContainer.First().YouTubeEntry;  // debug 'entry'
DateTime theData = entry.Published;



回答2:


Just a quick guessing, maybe you have some problem with build configuration setting. You can see the current setting at Visual studio menu: Build->Configuration Manager.

Just to make sure, do Build->Batch Build before doing the test. If you are using ASP.Net, make sure that the web (virtual folder in IIS, and site link) you use already refer to the latest code. It is just to make sure that your tested items will be the latest.



来源:https://stackoverflow.com/questions/15336824/why-on-debug-some-field-are-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!