How do I obtain an ID that allows me to tell difference instances of a class apart?

前端 未结 6 1890
谎友^
谎友^ 2021-02-02 13:30

Imagine I have a single class, with two instances:

MyClass a = new MyClass();
MyClass b = new MyClass();

MyClass has a method PrintUniqueInstan

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-02 13:57

    An active (not automatic) solution while debugging is to right click on an instance and chose "Make Object ID". It'll append a {$1} next to your instance name and class.

    If later on, you stumble upon another instance, it will be missing that {$1} mark.

提交回复
热议问题