title: C# like events in Javascript
body: <p>How can I create a new event/ like in c# in javascript?</p>
  
  <pre><code>private event EventHandler asdCompleted;
  
  private void SetEventHandlers()
  {
      this.asdCompleted += asd_completed;
  }
  
  private void asd_completed(object sender, EventArgs e)
  {
  
  }
  </code></pre>
  
  <p>and fire the event anywhere like in c#:</p>
  
  <pre><code>this.asdCompleted(this, null);
  </code></pre>