| 05-30-2010, 07:41 AM | #1 |
1. Using zinc, I have not been able to figure out how to implement a readonly struct member. Is there a way I can turn off the zinc check from within the struct to do this, or some other workaround? 2. Do I really have to put "this" as a prefix before every "." ? Or am I encountering this weirdness because of some other error I've made? 3. I should note that I'm doing this using the //! zinc & //! endzinc tags. |
| 05-30-2010, 08:07 AM | #2 |
Instead of using a readonly member, you can use a private member variable, and a public method that returns the value of the variable (which will be inlined). I wouldn't consider this a workaround, this is how it is done in a lot of major programming languages. I can't give you any example, since I'm unfamiliar with zinc syntax. |
| 05-30-2010, 08:16 AM | #3 |
Thank you, I am told that short functions are inlined, so this should be fine :) |
| 05-30-2010, 10:55 AM | #4 | |
Quote:
|
