我理解为什么它会被抛出,但为什么当我有一个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;
}