|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 2011-08-30 12:38:11
Posts: 61,
Visits: 183
|
|
Hi, I want to create a function returning a generic type, if I do :
public static IEcoList<VmVersion> SelectVmVersion(string pQuery) {
return SelectBoldElement(null, pQuery, false).GetAsEcoList<VmVersion>();
}
ok, but I want a generic function of the type:
public static IEcoList<T> SelectVmVersion(string pQuery) {
return SelectBoldElement(null, pQuery, false).GetAsEcoList<T>();
}
But it doesen't compile any idea?
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2010-11-30 12:17:13
Posts: 1 230,
Visits: 1 382
|
|
This is the method declaration you want:
public static IEcoList<T> SelectVmVersion<T>(string pQuery) where T: class, IEcoObject
{
}
/Jonas Hogstrom [CapableObjects]
|
|
|
|