You need a member variable and a full property declaration. Automatically implemented properties are only applicable if they’re trivial wrappers around a field, with no logic involved. You can simplify your getter code slightly, btw:
get
{
if (_myProperty == null)
{
_myProperty = XYZ;
}
return _myProperty;
}
(Note that none of this is thread-safe without extra locking, but I assume that’s okay.)
By the way, you already have a private member variable if you’re using automatically implemented properties – it’s just that the compiler’s generating it for you.