private static void TestaException3() { using (var leitor = new LeitorDeArquivo()) { leitor.Leh(); } }
private static void TestaException4() { LeitorDeArquivo leitor2 = null; try { leitor2 = new LeitorDeArquivo(); leitor2.Leh(); } catch (IOException e) { WriteLine(e.Message); throw; } finally { if (leitor2 != null) { leitor2.Dispose(); } } }