Beispiel #1
0
        static void DisposeMethod()
        {
            String          example  = "Hola con dispose";
            DisposeExercice exercice = new DisposeExercice(example);

            exercice.DisposeFunction();
            Console.WriteLine($"Usando dispose{exercice}");
            Console.Read();
        }
Beispiel #2
0
        static void UsingMethod()
        {
            String example = "Hola con using";

            using (DisposeExercice exercice = new DisposeExercice(example))
            {
                Console.WriteLine($"Usando using: {exercice}");
                Console.Read();
            }
        }