C# equivalent to Java's Exception.printStackTrace()?

后端 未结 8 1448
刺人心
刺人心 2021-01-31 13:13

Is there a C# equivalent method to Java\'s Exception.printStackTrace() or do I have to write something myself, working my way through the InnerExceptions?

8条回答
  •  春和景丽
    2021-01-31 13:48

    Is there no C# Logging API that can take an Exception as an argument and handle everything for you, like Java's Log4J does?

    I.e., use Log4NET.

提交回复
热议问题