I think we cannot have a delegate or event handler for datatypes like integer. instead you can have a function like this..
Private int i = 0;
Public int SetGetValue
{
get
{
return i;
}
set
{
if (value == 5)
{
}
else
{
this.i=value;
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void btn_Click(object sender, EventArgs e)
{
this.SetGetValue=(this.SetGetValue)+1;
}
hope this helps....