C# Get Name of Derived Type from Inside base Class

前端 未结 4 1920
死守一世寂寞
死守一世寂寞 2021-02-05 02:39

During a debug session, it\'s important for me to identify the name of the actual derived class in the debug info of specific instances.

I tried using this

4条回答
  •  一向
    一向 (楼主)
    2021-02-05 02:51

    this.GetType().Name should work. You may not have a derived class.

提交回复
热议问题