我如何通过一类在C#中的实例循环?实例

2023-09-03 05:24:25 作者:- 教主__凡

有没有一种方法来遍历一个类在C#中的实例?这些实例不跟踪或管理的集合。

Is there a way to iterate over instances of a class in C#? These instances are not tracked or managed in a collection.

推荐答案

不是正规的框架内。你会需要手动跟踪他们。

Not inside the regular framework. You would need to track them manually.

您可以,但是,这样做在WinDbg中/ SOS - 主要用于调试的目的(不用于日常code)

You can, however, do this in windbg/sos - mainly for debugging purposes (not for routine code).