How to assign reference to object to null in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            object o = new object();

            o = null;

            Console.WriteLine(o);
        }
    }
}


/*
run:
 

*/

 



answered Jan 2, 2017 by avibootz

Related questions

1 answer 208 views
208 views asked Jan 2, 2017 by avibootz
1 answer 196 views
1 answer 245 views
245 views asked Nov 27, 2020 by avibootz
2 answers 353 views
2 answers 325 views
1 answer 240 views
...