Facebook
From boredumb, 1 Year ago, written in C#.
This paste is a reply to test from Reto Spoerri - view diff
Embed
Download Paste or View Raw
Hits: 139
  1.             Node thisNode = new Node();
  2.             thisNode.Id = 12412;
  3.             var r = new WeakReference(thisNode);
  4.             thisNode = null;
  5.             var currentLineNumber = 42;
  6.             string typeName = (thisNode != null) ? thisNode.GetType().ToString() : "undefined";
  7.             Debug.WriteLine("# '" + currentLineNumber + "' thisNode '" + r.Target + "' typeName '" + typeName + "'");
  8.