using System;
namespace Articulos.Cap04
{
public sealed class OrdenCatch
{
public static void Main( )
{
object o = null ;
try
{
int i = ( int ) o;
}
catch ( Exception e)
{
//...
}
catch ( InvalidCastException e)
{
//...
}
}
}
}
dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFydGljdWxvcy5DYXAwNAp7CglwdWJsaWMgc2VhbGVkIGNsYXNzIE9yZGVuQ2F0Y2gKCXsKCQlwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgkJewoJCQlvYmplY3QgbyA9IG51bGw7CgkJCQoJCQl0cnkKCQkJewoJCQkJaW50IGkgPSAoaW50KSBvOwoJCQl9CgkJCWNhdGNoIChFeGNlcHRpb24gZSkKCQkJewoJCQkJLy8uLi4KCQkJfQoJCQljYXRjaCAoSW52YWxpZENhc3RFeGNlcHRpb24gZSkKCQkJewoJCQkJLy8uLi4KCQkJfQoJCX0KCX0KfQ==
compilation info
prog.cs(19,25): error CS0160: A previous catch clause already catches all exceptions of this or a super type `System.Exception'
Compilation failed: 1 error(s), 0 warnings
stdout