Salut! j'ai un tableau public string[] tab_lexmark = { "Impact", "Interact",
adleni
Messages postés44Date d'inscriptionmardi 24 mai 2011StatutMembreDernière intervention26 mars 2014
-
29 mai 2011 à 12:30
sebmafate
Messages postés4936Date d'inscriptionlundi 17 février 2003StatutMembreDernière intervention14 février 2014
-
30 mai 2011 à 10:01
Salut!
j'ai un tableau
public string[] tab_lexmark = { "Impact", "Interact", "Pro", "S", "X", "Z" };
et ajouter un élément à ce tableau
// j'en fait un autre plus grand
string [] mon_tableau_en_plus_grand = new string [tab_lexmark.Length + 1];
// je transvase son contenu
tab_lexmark.CopyTo(mon_tableau_en_plus_grand, 0);
// je décide de continuer à utiliser ma référence 'mavariable'. L'ancien tableau sera détruit tout seul
tab_lexmark = mon_tableau_en_plus_grand;
tab_lexmark[tab_lexmark.Length-1] = "w";
il sera afficher cette tableau
Impact
Interact
Pro
S
X
Z
w
---> mais mon problème lorsque redémarrer mon programme
il sera afficher:
Impact
Interact
Pro
S
X
Z
A voir également:
Salut! j'ai un tableau public string[] tab_lexmark = { "Impact", "Interact",
cs_coq
Messages postés6350Date d'inscriptionsamedi 1 juin 2002StatutMembreDernière intervention 2 août 2014101 29 mai 2011 à 14:13
Bonjour,
Merci d'arrêter de faire n'importe quoi sur ce forum sous peine de désactivation du compte.
Nous avons autre chose à faire que supprimer des doublons, et ce genre d'attitude n'encouragera certainement pas les éventuelles personnes qui voudraient répondre.