title: Convert delegate to System.Action
body: <h2>Introduction</h2>
  
  <p>In my <strong>WP8 C#/XAML project</strong> I'm using events to notify my view that some async process is done.</p>
  
  <p>I have two types of delegates.</p>
  
  <p>I'm creating events from those delegates and there are several of them notifying my view that some operations are completed or started (in order to show progressbar, navigate to another page, disable some controls et cetera).</p>
  
  <p>In order to raise these events I want to create a private "notification method", which would raise those delegates.</p>
  
  <p>The method i have in mind is in Code Sample below as <code>fireUpEvent</code> method.</p>
  
  <h2>Code Sample</h2>
  
  <p>ReturnState enum</p>
  
  <pre><code>public enum ReturnState : int
  {
    state1 = 0,
    ...            //for the purpose of the presentation
    state6 = 15
    ...
  }
  </code></pre>
  
  <p>Definitions of events &amp; methods</p>
  
  <pre><code>public delegate void LoadingStartedEventHandler();
  public delegate void LoadingFinishedEventHandler(ReturnState state);
  
  public event LoadingStartedEventHandler LoadingStarted;
  public event LoadingFinishedEventHandler LoadingFinished;
  
  private void fireUpEvent(Action&lt;ReturnState&gt; action, Returnstate parameter)
  {
    if(action != null)
    {
      action(parameter);
    }
  }
  
  private void fireUpEvent(Action action)
  {
    if(action != null)
    {
      action();
    }
  }
  </code></pre>
  
  <p>Usage</p>
  
  <pre><code>fireUpEvent(LoadingFinished, ReturnState.state1);
  </code></pre>
  
  <h2>Description</h2>
  
  <p>The problem is, that when I try to compile I get an error saying:</p>
  
  <p><code>Argument1: Cannot convert from 'XXXX.YYYY.SomeClass.LoadingFinishedEventHandler' to 'System.Action&lt;XXXX.YYYY.Returnstate&gt;'</code></p>
  
  <p>I've tried googling, but haven't found any usefull stuff.</p>
  
  <p><strong>Why isn't it convertible?</strong></p>
  
  <p><strong>I'd like to <code>Action&lt;ReturnState&gt;</code> and <code>Action</code> in those methods instead of specific delegates, is it possible?</strong></p>
  
  <p><strong>Should I use any other "type" like <code>Action</code> instead?</strong></p>
  
  <p><strong>The only two I know from this "grooup" are <code>Func</code> &amp; <code>Action</code>, are there others?</strong></p>