static void TcpServerExceptionOccurred(object sender, ExceptionOccurredEventArgs args) { Console.WriteLine("Exception: " + args.Message); }
/// <summary> /// Raises the <see cref="E:ExceptionOccured" /> event. /// </summary> /// <param name="eventArgs">The <see cref="ExceptionOccurredEventArgs"/> instance containing the event data.</param> protected virtual void OnExceptionOccured(ExceptionOccurredEventArgs eventArgs) { if (ExceptionOccurred != null) ExceptionOccurred(this, eventArgs); }