Problem with generics

Posted by jess on Stack Overflow See other posts from Stack Overflow or by jess
Published on 2010-04-20T16:40:54Z Indexed on 2010/04/20 16:43 UTC
Read the original article Hit count: 120

Filed under:
|

I have this code in base class

 protected virtual bool HasAnyStuff<TObject>(TObject obj) where TObject:class 
  {
      return false;
  }

In child class I am overriding

protected override bool HasAnyStuff<Customer>(Customer obj) 
  {
    //some stuff
      if Customer.sth etc
      return false;
  }

I am getting this error

'''Type parameter declaration must be an identifier not a type'''

What is it I am doing wrong here?

© Stack Overflow or respective owner

Related posts about c#

Related posts about generics