And today I learned that you can't always just turn a member variable into an accessor in C# http://pastebin.com/E5JktzEh . Baffling!
-
-
@increpare explicitly assign an initial value to all fields before any methods (which includes property getter & setters) can be called. -
@Abashizali so ultimately the fact that they're actually methods is given priority over the fact that they look like member variables? - 3 more replies
New conversation -
-
-
@increpare Your other option is to explicitly state the backing field of the property "public int I{ get {return this.i;}..." etc -
@Abashizali yip. It's just a funny edge case, really. I shan't abandon Unity on account of it...
End of conversation
New conversation -
-
-
@increpare Unlike classes, structs are (typically) assigned on the stack, where memory can be non-zero; that means the constructor must...Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@increpare By calling this(), you invoke the default constructor that assigns a zero value to everything.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@increpare Then assign the value of the field "i" before using the property "I"Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.