WPF Binding Failure performance hit vs Exception

后端 未结 2 1706
攒了一身酷
攒了一身酷 2020-12-11 16:46

when we bind to heterogeneous collection of objects, not all objects have the same set of properties. in the output window we get a message like:

Syst

2条回答
  •  臣服心动
    2020-12-11 17:18

    You're only seeing that output because you're running inside Visual Studio. Normally those trace statements go nowhere because there is no trace listener. Either way, the performance implications are completely negligible.

    Exceptions, on the other hand, would be a very costly way of reporting binding failures, particularly because - as you note - there are often bindings that work against some objects but not others.

提交回复
热议问题