예제 #1
0
        public static void Test()
        {
            using (SimpleClass c1 = new SimpleClass())
            {
                // do things
            }
            // above code is same as below effct
            SimpleClass c2 = new SimpleClass();

            try
            {
                // do things
            }
            catch (Exception ex)
            {
            }
            finally
            {
                c2.Dispose();
            }
        }