Add example of how to use scoped member variable

The syntax for how to do this has changed several times so it's time to document the right way to do it.