Generics - Interface Syntax question

G

Gonza

Hi group, i need a bit of help with this:

public abstract class BusinessComponent<TData, TDataMapper>
where TData : BusinessEntity,new()
where TDataMapper : DataMappers.DataMapper<TData>, new()

I want BusinessComponent to implement an interface i created, however i
can't get the syntax right! what am i doing wrong? Thanks in advance

Gonzalo
 
D

Dustin Campbell

public abstract class BusinessComponent<TData, TDataMapper>: IMyDandyInterface
where TData : BusinessEntity,new()
where TDataMapper : DataMappers.DataMapper<TData>, new()

Best Regards,
Dustin Campbell
Developer Express Inc.
 
D

Dustin Campbell

Thanks a lot!!!

np. It can get confusing where things are supposed to go when the colons
start flying into the declaration due to constraints.

Best Regards,
Dustin Campbell
Developer Express Inc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top