M MikeJ Jul 24, 2007 #1 hi i have a class..i want to fire events so a ui can respond where can i find a good example tks mJ
C ClayB Jul 24, 2007 #3 1) You declare the event. public delegate void DateValueChangingEventHandler(object sender, DateValueEventArgs e); public event DateValueChangingEventHandler DateValueChanging; 2) You define the argument classes (if you are using a derived argument class). public class DateValueEventArgs : CancelEventArgs { //... } 3) You raise the event in your code : DateValueEventArgs e = new DateValueEventArgs(oldValue, newValue); if(DateValueChanging != null) { DateValueChanging(this, e); } ===================== Clay Burch Syncfusion, Inc.
1) You declare the event. public delegate void DateValueChangingEventHandler(object sender, DateValueEventArgs e); public event DateValueChangingEventHandler DateValueChanging; 2) You define the argument classes (if you are using a derived argument class). public class DateValueEventArgs : CancelEventArgs { //... } 3) You raise the event in your code : DateValueEventArgs e = new DateValueEventArgs(oldValue, newValue); if(DateValueChanging != null) { DateValueChanging(this, e); } ===================== Clay Burch Syncfusion, Inc.