I need the .net equiv of Err.Number from vb6.
I can catch all sorts of different error types but I want to know the number.
For example, in asp.net I can catch Err as FileNotFoundException (same as Err.Number=53), but I want to be able to do this:
Catch Err as Exception
If Err.Number = 76 then
' hanlde PATH not found error
If Err.Number = 53 then
' hanlde FILE not found error