private void OnWorldSavedCompleted(int totalHoursWorked, string message, string saviour, DateTime timeOfNextCatastrophy) { if (WorldSavedCompleted != null) { WorldSavingCompletedEventArgs e = new WorldSavingCompletedEventArgs() { Saviour = saviour, MessageFromSaviour = message, HoursItTookToSaveTheWorld = totalHoursWorked, TimeForNextCatastrophy = timeOfNextCatastrophy }; WorldSavedCompleted(this, e); } }
static void superman_WorldSavedCompleted(object sender, WorldSavingCompletedEventArgs e) { Console.WriteLine(string.Format( "{0} ,has Finished saving the world :)!", e.Saviour)); }