메뉴 닫기

C# interface 안에서 Delegate 선언

How to add a delegate to an interface C#

interface내에서 delegate를 선언하면 Error가 발생한다
public interface IMyInterface
{
  public delegate void UpdateStatusEventHandler(string status);
  public delegate void StartedEventHandler();
UpdateStatusEventHandler StatusUpdated {get; set;} StartedEventHandler Started {get; set;} }
이때는 interface 바깥부분에 delegate를 선언하면 된다
public delegate void UpdateStatusEventHandler(string status);
public delegate void StartedEventHandler();
public interface IMyInterface { UpdateStatusEventHandler StatusUpdated {get; set;} StartedEventHandler Started {get; set;} }

9 Comments

  1. cbd oil that works 2020

    Hey there would you mind sharing which blog platform you’re working with?
    I’m going to start my own blog in the near future but I’m having a tough time selecting between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your design and
    style seems different then most blogs and I’m looking for something completely
    unique. P.S My apologies for being off-topic but I
    had to ask!

  2. cbd oil that works 2020

    It is the best time to make some plans for the future and it is time to be happy.
    I have learn this publish and if I may just I wish to recommend you some attention-grabbing issues or
    advice. Maybe you could write subsequent articles relating to this article.
    I desire to read even more issues approximately it!

  3. web hosting providers

    Hi! This is kind of off topic but I need some guidance from an established blog.
    Is it hard to set up your own blog? I’m not very techincal but I can figure things
    out pretty quick. I’m thinking about making my own but I’m not sure where to begin.
    Do you have any points or suggestions? Appreciate it

  4. cheap flights to florida

    Having read this I believed it was extremely enlightening.
    I appreciate you taking the time and effort to put this short
    article together. I once again find myself spending way too
    much time both reading and posting comments. But so what,
    it was still worth it!

댓글 남기기

이메일은 공개되지 않습니다.