Observing change in value of member variable
<p>I want to get notification on modification of some class member-variable(may be primitive or user-defined).</p>

<p>Can anyone let me know how to achieve this.</p>

<p>Thanks</p>

<p>Little more clarification to my question:</p>

<p>I have scenario something like</p>

<p>I have existing menu and menu-items. Now I am putting all these menu-items on toolbar. Since when these menu-items was inside menu-item I get event ON_UPDATE_COMMAND_UI where I call a function and update menu-items states.</p>

<p>But now for toolbar I have to put function for checking state every time, variables(which are many in number and also gets modified at many state, for which I have no control).</p>

<p>Can anyone suggest me some good alternative, without changing the existing code, since it's very fragile.</p>

<p>Is there any way we get some variable change notification from language/compiler, such as the way the Watch variable works in visual studio debugger.</p>
