Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            SpeechSynthesizer speak = new SpeechSynthesizer();
            //speak.Speak("Hi this is .net");
            int A = 100;
            int B = A-- - --A;

            Console.WriteLine(B);

            Console.WriteLine("derived to derived started");
            Derived dd = new Derived();

            Console.WriteLine("d to d finished");
            Console.WriteLine("base to derived started");
            Base bd = new Derived();

            bd.Func1();
            Console.WriteLine("base to derived end");
            Console.WriteLine("base to base");
            Base bb = new Base(1);

            Console.WriteLine("base to base");
            Console.WriteLine("dd.DM();");
            dd.DM();
            Console.WriteLine(" dd.BM();");
            dd.BM();
            Console.WriteLine(" bd.BM();");
            bd.BM();
            Console.WriteLine("bb.BM();");
            bb.BM();
            Console.WriteLine("--------end------");

            MyClass test = new MyClass();

            test.Calc(10, 5.4f);

            FileOperations ff = new FileOperations();

            ff.CreateFiles();

            ObjectRef  obj     = new ObjectRef();
            TestObjref testObj = new TestObjref();

            obj.MyProperty     = 1;
            testObj.MyProperty = 3;
            testObj.NullObject(obj);
            obj = testObj;
            Console.WriteLine(obj.MyProperty);
            Console.WriteLine(testObj.MyProperty);

            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public void NullObject(ObjectRef obj)
 {
     obj.MyProperty = 2;
     obj            = null;
 }