You have declared
Exception
to be a namespace in your project.
Now when you try and use it in your exception handler i.e.
(Exception ex)
, you will run into a problem. This is assumed to be a namespace by the compiler.
Try this instead -
namespace Exception
{
public class Class1
{
public static void logger(System.Exception ex)
{
}
}
}