how to declare custom event in interface

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?cm9kY2hhcg==?=

    how to declare custom event in interface

    hey all,
    i have a working example of a simple event delegation:

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


    can someone please show me how to define my custom event in an interface?

    thanks,
    rodchar
  • Ignacio Machin ( .NET/ C# MVP )

    #2
    Re: how to declare custom event in interface

    On Jul 30, 11:20 am, rodchar <rodc...@discus sions.microsoft .com>
    wrote:
    hey all,
    i have a working example of a simple event delegation:
    >
    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

    >
    can someone please show me how to define my custom event in an interface?
    >
    thanks,
    rodchar
    public interface ISystemEditorVi ew {

    event EventHandler<In itializeEventAr gsInitialize;

    event EventHandler<In itializeDataEve ntArgsInitializ eData;
    }

    Comment

    • Ignacio Machin ( .NET/ C# MVP )

      #3
      Re: how to declare custom event in interface

      On Jul 30, 11:20 am, rodchar <rodc...@discus sions.microsoft .com>
      wrote:
      hey all,
      i have a working example of a simple event delegation:
      >
      Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

      >
      can someone please show me how to define my custom event in an interface?
      >
      thanks,
      rodchar
      of course, you have to define your classes deriving from EventArgs:

      public class InitializeEvent Args: EventArgs {

      private Form form;

      public Form Form {
      get { return form; }
      set { form = value; }
      }

      }

      Comment

      Working...