Documentation incorrect, "m_" works, "_" doesn't

58 views
Skip to first unread message

jwvand...@gmail.com

unread,
Dec 26, 2016, 1:00:37 PM12/26/16
to Developer Support
Just wanted to post this here, as it got me really confused for about 15 minutes. The documentation and examples indicate that you can use a backed variable named "m_Blah" or "_blah" but that isn't entirely true. Only "m_Blah" works out of the box. If you want to use "_blah" then you HAVE to specify the property name that it links to.

Developer Support

unread,
Jan 2, 2017, 4:36:57 AM1/2/17
to Developer Support
Hi! Can you share an example? This still works for me, as long as the case matches. For example, the backing field _myInt will automatically map to the property myInt, but it will not automatically map to the property MyInt.

jwvand...@gmail.com

unread,
Jan 2, 2017, 1:21:15 PM1/2/17
to Developer Support
Ok fair enough it would have been something like "_myInt" and "MyInt" but then that is how it is done. You don't have a public property starting with a lowercase :)

In either case I'm not necessarily saying it is a bug just that I found the docs had me confused and I spent a good 15 minutes wondering why it kept saying my property had no accessors :)

dra...@gmail.com

unread,
Feb 18, 2019, 10:39:46 PM2/18/19
to Developer Support
Just wanted to follow up that this did the same for me.

I kept trying to make it work with "_xxx" for Property "Xxx". I eventually stumbled on the solution myself, but it would have been good to have the case sensitive part clarified.

Reply all
Reply to author
Forward
0 new messages