static void Main(string[] args) { OtraClase otraClase; try { otraClase = new OtraClase(); otraClase.UnMetodoDeInstancia(); }catch (MiExcepcion ex) { Console.WriteLine(ex.Message); if (!(ex.InnerException is null)) { Exception auxEx = ex.InnerException; do { Console.WriteLine(auxEx.Message); auxEx = auxEx.InnerException; } while (!(auxEx is null)); } } Console.ReadKey(); }
public void TestMetodoDeInstancia() { OtraClase clase = new OtraClase(); clase.UnMetodoDeInstancia(); }