timer as part of a struct
<p>I have the following struct</p>

<pre><code>private struct sData{
    public int volume;      
    public System.Timers.Timer aliveTimer;
    public void OnTimedEvent(object source, ElapsedEventArgs e)
    {
        Console.WriteLine("this = " + volume);// I cannot access volume here
    }
}
</code></pre>

<p>and when the time elapsed i want to change volume value and i can't access it in OnTimedEvent
I use this code to start the struct and the timer:</p>

<pre><code>sData ret = new sData();
ret.volume = rand.Next(1, 10) * 100;    
ret.aliveTimer = new System.Timers.Timer(1000);
ret.aliveTimer.Elapsed += new ElapsedEventHandler(sData.OnTimedEvent);
ret.aliveTimer.Start();
</code></pre>

<p>what should I do?</p>
