Facebook
From boredumb, 6 Years ago, written in C#.
This paste is a reply to test from Reto Spoerri - go back
Embed
Viewing differences between test and Re: test
            Node thisNode = new Node();
            thisNode.Id = 12412;
            var r = new WeakReference(thisNode);
            thisNode = null;
            var currentLineNumber = 42;
            
string typeName = (thisNode!=null)?thisNode.(thisNode != null) ? thisNode.GetType().ToString():"undefined";
ToString() : "undefined";
            
Debug.Log("# '"+currentLineNumber+"' WriteLine("# '" + currentLineNumber + "' thisNode '"+thisNode+"' '" + r.Target + "' typeName '"+typeName+"'");


the above code returns:
# '2' thisNode ' thisId: -41942' 
'" + typeName 'undefined'+ "'");