cs_blueangel
Messages postés69Date d'inscriptionsamedi 4 janvier 2003StatutMembreDernière intervention19 mars 2009
-
4 juil. 2007 à 12:10
ricklekebekoi
Messages postés303Date d'inscriptionmardi 11 février 2003StatutMembreDernière intervention24 avril 2009
-
5 juil. 2007 à 01:48
bonjour
est ce que quelqu'un pourrait corriger ce bout de code?
public List<string> <string> GetAllBrands()
{
List<TblBrand> ListBrand;
//cette ligne de code provoque une erreur dans le code et le cast est incorrecte
ListBrand = (List<TblBrand>)Product.GetAllObjects("Brand");
......
}
public static List<object> GetAllObjects(string ObjectName)
{
...
}
merci !!!
sebmafate
Messages postés4936Date d'inscriptionlundi 17 février 2003StatutMembreDernière intervention14 février 201436 4 juil. 2007 à 12:15
pourquoi ne pas faire :
public List<string> <string> GetAllBrands()
{
List<TblBrand> ListBrand;
//cette ligne de code provoque une erreur dans le code et le cast est incorrecte
ListBrand = Product.GetAllObjects<TblBrand>("Brand");
......
}
public static List<T> GetAllObjects<T>(string ObjectName)
{
...
}