コード例 #1
0
ファイル: MyResourceWrapper.cs プロジェクト: neveand/study
    public static void TestClass()
    {
        Console.WriteLine("creating wrapper...");
        MyResourceWrapper wrapper = new MyResourceWrapper();

        Console.WriteLine("using wrapper...");
    }
コード例 #2
0
        //~Program()
        //{
        //    object
        //    Console.WriteLine(" prOGRAM CLASS Finalizer ");
        //}
        static void Main(string[] args)
        {
            MyResourceWrapper rw = new MyResourceWrapper();

            //Console.WriteLine("***** Fun with Finalizers *****\n");
            //Console.WriteLine("Hit the return key to shut down this app");
            //Console.WriteLine("and force the GC to invoke Finalize()");
            //Console.WriteLine("for finalizable objects created in this AppDomain.");

            ////MyResourceWrapper rw2 = new MyResourceWrapper();

            ////Program program = new Program();
            ///

            using (Student stu = new Student())
            {
                // logic , data
            }

            Student stu2 = new Student();

            //stu.Dispose();

            Console.ReadLine();
        }
コード例 #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("*** Fun With Finalizers ****");
            Console.WriteLine("Hit enter to initiate finalize() method");

            Console.ReadLine();
            MyResourceWrapper rw = new MyResourceWrapper();
        }
コード例 #4
0
 static void Main(string[] args)
 {
     Console.WriteLine("***** Fun with Finalizers *****\n");
     Console.WriteLine("Hit the return key to shut down this app");
     Console.WriteLine("and force the GC to invoke Finalize()");
     Console.WriteLine("for finalizable objects created in this AppDomain.");
     Console.ReadLine();
     MyResourceWrapper rw = new MyResourceWrapper();
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: usedflax/flaxbox
 static void Main( string[] args )
 {
     Console.WriteLine("***** Fun with Finalizers *****\n");
     Console.WriteLine("Hit the return key to shut down this app");
     Console.WriteLine("and force the GC to invoke Finalize()");
     Console.WriteLine("for finalizable objects created in this AppDomain.");
     Console.ReadLine();
     MyResourceWrapper rw = new MyResourceWrapper();
 }
コード例 #6
0
ファイル: Program.cs プロジェクト: dakazia/apress
        private static void CreateObjects(int count)
        {
            MyResourceWrapper[] tonsOfObjects = new MyResourceWrapper[count];
            for (int i = 0; i < count; i++)
            {
                tonsOfObjects[i] = new MyResourceWrapper();
            }

            tonsOfObjects = null;
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: ding99/CSharpSyntax
        static void Finalization()
        {
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("=> finalizers");

            Console.WriteLine("Hit the return key to shut down this app");
            Console.WriteLine("and force the GC to invoke Finalize()");
            Console.WriteLine("for finalizable objects created in this AppDomain.");
            Console.ReadLine();
            MyResourceWrapper rw = new MyResourceWrapper();
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: slctr/EPAM.DotNET.Training
 static void Main(string[] args)
 {
     Debug.WriteLine("***** Fun with Finalizers *****\n");
     Debug.WriteLine("Hit the return key to shut down this app");
     Debug.WriteLine("and force the GC to invoke Finalize()");
     Debug.WriteLine("for finalizable objects created in this AppDomain.");
     // Нажмите клавишу <Enter>, чтобы завершить приложение
     // и заставить сборщик мусора вызвать метод Finalize ()
     // для всех финализируемых объектов, которые
     // были созданы в домене этого приложения.
     var rw = new MyResourceWrapper();
 }
コード例 #9
0
 static void Main(string[] args) {
     MyResourceWrapper a = new MyResourceWrapper();
 }
コード例 #10
0
 static void tmp1()
 {
     MyResourceWrapper rw = new MyResourceWrapper();
 }