public void Getrecords(ref IList iList,T dataItem)
{
iList = Populate.GetList() // GetListis defined as GetList
}
data
Your revised question passes in dataItem as an object of type T and then tries to use it as a type argument to GetList(). Perhaps you pass dataItem in only as a way to specify T?
If so, the you may want something like so:
public IList GetRecords() {
return Populate.GetList();
}
Then you call that like so:
IList result = GetRecords();