Hi manvendra45,
I don't think there is a trick to avoid exception but you can use the following code.
public void IgnoreExceptions(Action act)
{
try
{
act.Invoke();
}
catch
{
}
}
And call like this.
try
{
IgnoreExceptions(() => method1());
IgnoreExceptions(() => method2());
IgnoreExceptions(() => method3());
IgnoreExceptions(() => method4());
IgnoreExceptions(() => method5());
IgnoreExceptions(() => method6());
IgnoreExceptions(() => method7());
IgnoreExceptions(() => method8());
IgnoreExceptions(() => method9());
IgnoreExceptions(() => method10());
}
catch
{
}