Take the 2-minute tour ×  I'm experiencing the following:  Foo
myFoo = new Foo();   // Init a Foo, right? myFoo.bar = 5;      
   // property assigned Debug.Log(myFoo.bar);    // Properly
traces the value 5 or whatever to the console Debug.Log(myFoo);
      // Traces "null" to the console..... WTF?!?!?!?  This is
happening using C# in MonoDevelop in conjunction with Unity 3.5.
In this case, Foo is subclassing Object, and to my knowledge,
isn't dynamic. Is there some nuance of C# I'm missing here,
because this is extremely weird behavior, and I have never seen
it in ActionScript 3 or Objective-C. It's odd to me that the
runtime is able to access/assign a property of a variable that
simultaneously traces "null", without even throwing a
NullException or some kind of error. Any ideas on why this might
be occurring would be a huge help. Thanks in advance.
share|improve this question Where to you get the Debug.Log
method you use? System.Diagnostics.Debug has no such method.
Maybe it is mono specific? Also - I tr