Esempio n. 1
0
        static void Main(string[] args)
        {
            using (CrucialConnection c = new CrucialConnection())
            {
                // do something with the crucial connection
            }

            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            //CTO: There are two ways to make sure that Dispose is called correctly; you can call the
            //method yourself in your application, or you can make use of the C# "using" construction.

            //CTO: quando o using acaba é chamado o dispose do objeto ao qual esta sendo usado
            using (CrucialConnection c = new CrucialConnection())
            {
                // do something with the crucial connection
            }

            Console.ReadKey();
        }