1. if you working on asp.net application web.config has application_error event in that you can catch the exception directly.
3. var vs dynamic
var : it is Statically typed – This means the type of variable declared is decided by the compiler at compile time, Since the compiler knows about the type and the methods and properties of the type at the compile time itself, Visual Studio shows intelligence since the type of variable assigned is known to compiler.
Dynamic : it is Dynamically typed - This means the type of variable declared is decided by the compiler at runtime time, Since the compiler comes to about the type and the methods and properties of the type at the run time, intelligence is not available since the type and its related methods and properties can be known at run time only
Editor, DotNetSpider MVM
Microsoft MVP 2014 [ASP.NET/IIS]