S
shapper
Hello,
I have the following class:
public class PagedList<T> : List<T>, IPagedList<T> {
public PagedList(IEnumerable<T> source, Int32 index, Int32 size)
{
// Some code
} // PagedList
public PagedList(IQueryable<T> source, Int32 index, Int32 size) {
PagedList(source.AsEnumerable(), index, size);
}
}
I get the error:
Using the generic type 'PagedList<T>' requires '1' type arguments
I understand that it is asking me the T but what I am trying is to
call the other constructor.
This might be strange but basically I am trying to initialize a class
in two different ways but since IQueryable implements IEnumerable then
the code will be the same same ...
Thanks,
Miguel
I have the following class:
public class PagedList<T> : List<T>, IPagedList<T> {
public PagedList(IEnumerable<T> source, Int32 index, Int32 size)
{
// Some code
} // PagedList
public PagedList(IQueryable<T> source, Int32 index, Int32 size) {
PagedList(source.AsEnumerable(), index, size);
}
}
I get the error:
Using the generic type 'PagedList<T>' requires '1' type arguments
I understand that it is asking me the T but what I am trying is to
call the other constructor.
This might be strange but basically I am trying to initialize a class
in two different ways but since IQueryable implements IEnumerable then
the code will be the same same ...
Thanks,
Miguel