I used it as a callback in an event handler. When I raise the event, I pass in a method taking a string a parameter. This is what the raising of the event looks like:
SpecialRequest(this,
new BalieEventArgs
{
Message = "A Message",
Action = UpdateMethod,
Data = someDataObject
});
The Method:
public void UpdateMethod(string SpecialCode){ }
The is the class declaration of the event Args:
public class MyEventArgs : EventArgs
{
public string Message;
public object Data;
public Action<String> Action;
}
This way I can call the method passed from the event handler with a some parameter to update the data. I use this to request some information from the user.