为什么在调试时某些字段“丢失"? [英] Why on Debug some field are "missing"?

查看:46
本文介绍了为什么在调试时某些字段“丢失"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我写了:

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

代码完美运行.但是,如果我进入调试"模式并分析videoContainer扩展字段,则看不到该字段 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.

为什么?

推荐答案

当您首先获取感兴趣的项目时,它的工作要容易得多

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;

这篇关于为什么在调试时某些字段“丢失"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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