C# Event Handler

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ricardo Trujillo

    #1

    C# Event Handler

    I need to do this in C#. How can I do it?

    Private Sub TestLocalEventH andler()
    Dim m_olApp As New Outlook.Applica tion()
    AddHandler m_olApp.NewMail , AddressOf _
    Me.EventHandler NewMail
    RemoveHandler m_olApp.NewMail , AddressOf
    Me.EventHandler NewMail
    End Sub

    Thanks in advance!!!

    Ricardo trujillo
    Medellin-Colombia
  • Miha Markic

    #2
    Re: C# Event Handler

    Hi,

    If you have vs.net 2003 just type

    m_olApp.NewMail +=

    and hit tab twice - it will autocomplete the declaration and create event
    sink method

    Miha

    "Ricardo Trujillo" <jtrujillo@inte rgrupo.com> wrote in message
    news:001601c34e 14$c4054ce0$a40 1280a@phx.gbl.. .[color=blue]
    > I need to do this in C#. How can I do it?
    >
    > Private Sub TestLocalEventH andler()
    > Dim m_olApp As New Outlook.Applica tion()
    > AddHandler m_olApp.NewMail , AddressOf _
    > Me.EventHandler NewMail
    > RemoveHandler m_olApp.NewMail , AddressOf
    > Me.EventHandler NewMail
    > End Sub
    >
    > Thanks in advance!!!
    >
    > Ricardo trujillo
    > Medellin-Colombia[/color]


    Comment

    Working...