Advertisement
andrew4582

Event Args` - Event argument with a typed item property

Jan 30th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Common.Utilities
  4. {
  5.     /// <summary>
  6.     /// Event argument with a typed item property
  7.     /// </summary>
  8.     public class EventArgs<T> : EventArgs
  9.     {
  10.         public T Item { get; private set; }
  11.         public bool Cancel { get; set; }
  12.  
  13.         public EventArgs(T item)
  14.         {
  15.             this.Item = item;
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement