I Have A Problem With Raise Event In C#

Mar 18 2007 12:41 PM
Am building a class Called MailClass which I need to Raise event called ShowInfo each time I have any Messages.

In Vb.Net You simple go to class Modules and write Public Event ShowInfo(ByVal MsgReport As String).

To send any Messagse  I would write RaiseEvent Showinfor("hai")

Then to consume it in a form I would write Dim WithEvents ReportError As MailClass
Automatically it will gives me a procedure called
Public Sub MsgReport _AnyError(ByVal ReportError As String)
MsgBox ReportError
End Sub


Please How can I do all these in C#

Answers (1)