locked
Compiler error ,why RRS feed

  • Question

  •  public class DataEventArgs<T> : EventArgs
        {
            T data;

          public DataEventArgs(T data)
            {
                if (data == null )
                {
                    throw new ArgumentNullException("data");
                }
                this.data = data;
            }
       }

    above is a simple eventargs class, but when i compiler it in VS2005 July ,
    compiler error occured, "opertor '==' cann't apply to operands type 'T' and '<null>'.
    who can tell me how to correct it ?

    thanks.

    Friday, August 12, 2005 5:52 AM

Answers

All replies