can I have an abstract base class with the key attribute being generic

Posted by Greg on Stack Overflow See other posts from Stack Overflow or by Greg
Published on 2010-05-10T20:58:01Z Indexed on 2010/05/10 21:04 UTC
Read the original article Hit count: 184

Filed under:
|
|
|

Hi,

I want to create a re-usable library. I was going to use extension methods however I run into some issues in some cases for the client to have to specify in the calling method the types.

QUESTION - If I use an abstract base class as the basis, can I specify an attribute/property in the class to be generic (e.g. the key property might be an 'int' in one case, or a 'string' in another)?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET