MonoTouch and null
Remember. Setting variables to null doesn’t necessarily mean null. I had an Enum variable that I would set once. So I’d declare it:
Values MyValue = null;
Then, in the natural order of things I’d check to see if it was null and assign it the current value if it was. But, oddly enough it was never null. I forgot in obj-c (or c in general) unless you specifically set a pointer it’s pointing at god knows what. So I added a None value to my enum and made sure to set it up as such:
Values MyValue = Values.None;

Latest Comments