title: C# - Event/EventHandler syntax
body: <p>In my ASP.NET .NET 4 book, I'm seeing this syntax:</p>
  
  <pre><code>public event EventHandler&lt;AddressEventArgs&gt; SaveButtonClick;
  </code></pre>
  
  <p>I'm not familiar with this syntax, especially the '&lt; >' next to the event handler.  Could someone please explain the above code?</p>
  
  <p>Full code example from the book is below.</p>
  
  <pre><code>//Declare custom EventArgs to be used
  public class AddressEventArgs : EventArgs {
      public AddressEventArgs(string addressLine1, string addressLine2,
      string city, string state, string postalCode) {
          this.AddressLine1 = addressLine1;
          this.AddressLine2 = addressLine2;
          this.City = city;
          this.State = state;
          this.PostalCode = postalCode;
      }
      public string AddressLine1 { get; private set; }
      public string AddressLine2 { get; private set; }
      public string City { get; private set; }
      public string State { get; private set; }
      public string PostalCode { get; private set; }
  }
  
  //Code in a user control raising the event on a button click
  public event EventHandler&lt;AddressEventArgs&gt; SaveButtonClick;
  protected void ButtonSave_Click(object sender, EventArgs e) {
      if (SaveButtonClick != null) {
          SaveButtonClick(this, new AddressEventArgs(TextBoxAddress1.Text,
          TextBoxAddress2.Text, TextBoxCity.Text, TextBoxState.Text,
          TextBoxPostalCode.Text));
      }
  }
  </code></pre>