events call backs

  • Thread starter Thread starter MikeJ
  • Start date Start date
M

MikeJ

hi i have a class..i want to fire events
so a ui can respond
where can i find a good example
tks
mJ
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

how to make controls exported public 2
dynamic contols 4
output question 3
datagrid 1
Calling Vb6 from c# 3
Properties 7
SqlDataAdapter 1
Subscribing to events in assemblies loaded in separate appdomain? 2

Back
Top