Passing Custom event arguments to timer_TICK event
Posted
by Nimesh
on Stack Overflow
See other posts from Stack Overflow
or by Nimesh
Published on 2009-05-08T19:14:38Z
Indexed on
2010/03/23
5:01 UTC
Read the original article
Hit count: 452
I have class
//Create GroupFieldArgs as an EventArgs
public class GroupFieldArgs : EventArgs
{
private string groupName = string.Empty;
private int aggregateValue = 0;
//Get the fieldName
public string GroupName
{
set { groupName = value; }
get { return groupName; }
}
//Get the aggregate value
public int AggregateValue
{
set { aggregateValue = value; }
get { return aggregateValue; }
}
}
I have another class that creates a event handler
public class Groupby
{
public event EventHandler eh;
}
Finally I have Timer on my form that has Timer_TICK event. I want to pass GroupFieldArgs in Timer_TICK event. What is the best way to do it?
© Stack Overflow or respective owner