J'ai un ensemble de données et j'essaye d'obtenir tous les identifiants du datset dans un datarow pour finalement le sauver dans un tableau d'int. Ça ne fonctionne pas pour moi. Il dit "Cannot implicitly convert from type int to int[]"
Convertir int en] [
Dataset ds = new BusinessLogic().Getsamples(MerchantID);
Datarow dr = ds.Tables[0].Rows[0];
int[] SampleID = Convert.ToInt32(dr["Id"]);
Merci à l'avance ..
Convert.ToInt32 retourne un int pas un tableau d'entre eux: http://msdn.microsoft.com/en-us/library/sf1aw27b.aspx –
Est-ce vous essayez d'obtenir un seul ID (cast en single int) ou obtenir TOUT ID. Votre code est partie unique, partie multi. –