为什么没有捕获RuntimeBinderException?

时间:2015-04-22 11:10:33

标签: c# exception dynamic

我理解为什么它会被抛出,但为什么当我有一个catch块时它仍然未处理?有关详细信息,请参阅附图。

try
{
    // Exception is thrown at the following line as not all items have Id property
    addedLabours = currentLabours.Where(c => !previousLabours.Select(p => (Guid)p.Id).Contains((Guid)c.Id)); 
}
catch (RuntimeBinderException) 
{
    addedLabours = currentLabours;
}

enter image description here

0 个答案:

没有答案
相关问题