Can i know the main difference by just executing Generic Exception and specific Exceptions?

Hi @Naveen.Ch

If you catch exception of type System.Exception it will catch everything sort of exception and should be used generally when you do not know which type of exception may occur.

And if you know that you would be catching Null reference or say Input/Output exception you should use System.NullReferenceException/System.IO.IOException types.

Let me know if I have misunderstood the question



Hi @PrankurJoshi,

Thanks for the valuable Response.

Can you provide some more information like time might matter here in milliseconds.

Exceptions work in hierarchy pattern and if system finds specific catch it will proceed as defined.
I dont think time will matter in using the specific catch.

Actually the idea is that if you want to process a exception in a specific manner then you catch them and define the sequence you want to perform( say write a specific message to a file/table) but if you dont have such a requirement you catch just the generic one and proceed as default.