private void iterateStream_Click(object sender, EventArgs e) { Console.WriteLine("Iteration through file, using IEnumerable collection that you can iterate over."); Console.WriteLine("The collection function takes in a stream and is more general."); Console.WriteLine("However, it has disposable difficulties."); IterationTextFile_Part3.PrintFileMoreGeneral_ButBad(); }
private void button1_Click(object sender, EventArgs e) { IterationTextFile_Part3.PrintFile_SeeHowSomethingWrongHappens(); }
private void iterate_SomethingWrongHappens_Click(object sender, EventArgs e) { Console.WriteLine("Disposable difficulties."); IterationTextFile_Part3.PrintFile_SomethingWrongHappens(); }