当KeyNotFoundException被抛出,我怎么看这钥匙没有被发现?怎么看、抛出、钥匙、发现

2023-09-03 03:12:44 作者:枪枪稳中姑娘心

A System.Collections.Generic.Dictionary 抛出 KeyNotFoundException ,但我看不出哪个键据称失踪。如何确定呢?

A System.Collections.Generic.Dictionary is throwing KeyNotFoundException, but I can't see which key is supposedly missing. How do I determine this?

推荐答案

有没有办法从异常讲这个。您需要实现自己的解决方案这一点。

There is no way to tell this from the exception. You need to implement your own solution for this.