Generic Class receiving a List?

2

In C # I have how to implement a generic class where 1 of the attributes received is a List object

asked by anonymous 18.09.2017 / 19:45

1 answer

3

You have, just use type parameter constraint . I put object in the generic type of list, change to your need.

Example:

public class Negocio<TEnt, TDto, TDao, TList>() where TList : IList<object>
{
}
    
18.09.2017 / 20:02