Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Is it possible to get the errornumber in C#?
I have made a C# project and i put try en catch around the functions to do the error-handling. When an error is thrown i call a function, with Exception exc as an argument, to get the same errorpage every time an error is thrown.
In visual basic it was possible to get the number of the error that was thrown by: Err.Number
My question is whether this is possible in C# too? And how do you do this? Because the Exception exc hasn't got a property to do it.
0 · ·