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. Delegate + Event in C#

Delegate + Event in C#

Scheduled Pinned Locked Moved C#
csharp
3 Posts 3 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.
  • N Offline
    N Offline
    Nine_
    wrote on last edited by
    #1

    Hi all I'm faced to deverlop a program that sends a message from one form to another using Delegate and Event. I do know a little about Delegate but do not know about Event. I can't make them work together. Here is my exaple

    H P 2 Replies Last reply
    0
    • N Nine_

      Hi all I'm faced to deverlop a program that sends a message from one form to another using Delegate and Event. I do know a little about Delegate but do not know about Event. I can't make them work together. Here is my exaple

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      Nine_ wrote:

      Here is my exaple

      Er.............. Where? Or are you using anonymous delegates?

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      1 Reply Last reply
      0
      • N Nine_

        Hi all I'm faced to deverlop a program that sends a message from one form to another using Delegate and Event. I do know a little about Delegate but do not know about Event. I can't make them work together. Here is my exaple

        P Offline
        P Offline
        padmanabhan N
        wrote on last edited by
        #3

        //aspx.cs page //button1 click will fire the delegate event and then the onShowAllClick will fire the event. protected void Button1_Click(object sender, EventArgs e) { Response.Write("hi"); } //delegate event public void ShowAllClick(object sender, System.Web.UI.WebControls.CommandEventArgs e) { Response.Write("hello"); } //delegate public event CommandEventHandler Show; protected void onShowAllClick(Object sender, CommandEventArgs e) { if (e is CommandEventArgs) { ShowAllClick(sender, e); } } //aspx page

        Padmanabhan

        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