Exception Difference

Hello,

Could you please help me to understand the difference between these three!

    • new System.Exception(“test exception”)
    • new Exception(“test exception”)
    • new SystemException(“test exception”)

Thank you

Hi,

We can omit namespace if it’s imported in Imports panel. So we can express it with full namespace as the following.

  1. new System.Exception(“test exception”)
  2. new System.Exception(“test exception”)
  3. new System.SystemException(“test exception”)

From the above, we can know 1 is same with 2.

And 3 is the following.

Hope this helps you.

Regards,

1 Like

Thank you.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.