title: C# Subscribing to Events Using Interfaces
body: <p>I have recently started working with C# events and I am really liking the ease of use they offer (I come from a java background where we have to do all this event stuff manually).</p>
  
  <p>However, there is one thing from my java background that I am missing: the inheritance side.</p>
  
  <p>In java, if you want to subscribe to an event, you would inherit an interface such as IKeyListener. The interface would contain all of the method event signatures which you would then implement in the subscribing class. Whenever a key would be pressed, these implemented methods would be fired. Much the same as C#. However, unlike in java, I am unable to identify which classes subscribe to certain events because they don't actually inherit anything.</p>
  
  <p>So if I wanted a list of objects which have key press event support I could do </p>
  
  <pre><code>List&lt;IKeyListener&gt; keyListeners = new ArrayList&lt;IKeyListener&gt;();
  </code></pre>
  
  <p>However, I don't see any good way to do this in C#. How would I be able to create list similar to the one above? Preferably without much "hackiness".</p>
  
  <p>Thank you.</p>