Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to get Parameters Type of EventHandlers

How to get Parameters Type of EventHandlers

Scheduled Pinned Locked Moved C#
tutorialcomhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hasansheik
    wrote on last edited by
    #1

    Dear All, I have an EventInfo object of an event. I want to know the parameters type of the event Handler function. for example, EventHandler is the event parameters of event handler is object and EventArgs. please help me regarding this. regards, Mohamed Hasan. Contact him at: hasansheik@hotmail.com hasansheik@yahoo.co.in hasansheik@lycos.com

    S 1 Reply Last reply
    0
    • H hasansheik

      Dear All, I have an EventInfo object of an event. I want to know the parameters type of the event Handler function. for example, EventHandler is the event parameters of event handler is object and EventArgs. please help me regarding this. regards, Mohamed Hasan. Contact him at: hasansheik@hotmail.com hasansheik@yahoo.co.in hasansheik@lycos.com

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Get the Type object for the delegate behind the event and get the parameters of the Invoke method. Something like

      EventInfo []events = ktfaType.GetEvents();
      for(int i = 0; i
      This code relies on the fact that every delegate has an Invoke method which is automatically generated by the compiler depending on the type of delegate's declaration.

      Regards
      Senthil
      _____________________________
      My Blog | My Articles | WinMacro

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups