ObservableProperty On Changed Not Compiling #1150
Replies: 2 comments
|
Remove private/public word from |
|
Sigh... sorry, I figured out what I was doing wrong. Although I don't understand why it was wrong, and would appreciate some education :). This code (which precisely follows the online documentation) works: The key difference from one of the things I tried is that there is no scope declaration on the partial method (e.g., public, private). What I don't understand is I thought declaring the partial method to be public would be okay/required because the related property is explicitly declared as public. I also thought that leaving the scope declaration off -- which is what worked -- would result in the method being considered private, not matching the related property. Clearly, I don't understand scoping as applied to partial methods... :) |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to act on changed values of observable properties. This code:
generates the following compiler error:
I thought it might be because the method had to have an argument, but this code:
generates the following compiler error:
I'm using VS2026 with all the latest updates installed. What am I doing wrong?
All reactions