tags:

views:

96

answers:

2

Hi,

I can't figure out the correct sytax for the following:

public interface IRepository<T,E> where T E: class

Looked a lot online, but articles don't seem to cover two classes.

Thank you

+4  A: 
public interface IRepository<T,E> 
where T: class
where E: class 
Yves M.
+9  A: 

From the "Constraining Multiple Parameters" section of Constraints on Type Parameters (MSDN):

public interface IRepository<T, E> 
    where T : class
    where E : class
Justin Niessner
Thank you, i was trying to do where T,E: class
vikp