Logical error while implementing flag condition
<p>I have an event handler in a class SpoServer named HandleSpurtEvents</p>

<pre><code>public class SpoServer : DataModelObject, ISpoServer
{
    static private void HandleSpurtEvents(SPD.SPD_eventType type, SPD.SPD_event this_event, object passback)
    {
        if (this_event.variableData[0].atr_value == "refresh")
        {
            if (this_event.variableData[1].atr_value == "complete")
            {
                ss.OnInfoEvent(new InfoEventArgs(SpoServer.InfoEventArgs.InfoType.RefreshComplete, null));
            }
            else
            {
                SpoDebug.DebugTraceSevere(func, "Invalid refresh event: " + this_event.variableData[1].atr_value);
            }
        }
    }

    public bool Modify()
    {
    }
}
</code></pre>

<p>Here the method Modify, which contain some opertaion what my aim is only allow downside
operation in Modify() method if 'RuntimeUp' property and Refresh complete.So what i did is i created flag 'test' after refresh event and checked with alredy created RuntimeUp.But it throwing errors.test boolean variable is not accessble
That will be something like,here is my work</p>

<pre><code>public class SpoServer : DataModelObject, ISpoServer
{
    static private void HandleSpurtEvents(SPD.SPD_eventType type, SPD.SPD_event this_event, object passback)
    {
        if (this_event.variableData[0].atr_value == "refresh")
        {
            if (this_event.variableData[1].atr_value == "complete")
            {
                ss.OnInfoEvent(new InfoEventArgs(SpoServer.InfoEventArgs.InfoType.RefreshComplete, null));
                bool test = true;
            }
            else
            {
                SpoDebug.DebugTraceSevere(func, "Invalid refresh event: " + this_event.variableData[1].atr_value);
            }
        }
    }
    public bool Modify()
    {
        if (!RuntimeUp &amp;&amp; test) return false;
    }
}
</code></pre>
