Valeur de tableau

Résolu
Chrisly74 Messages postés 23 Date d'inscription lundi 10 avril 2006 Statut Membre Dernière intervention 11 mai 2006 - 5 mai 2006 à 10:08
Chrisly74 Messages postés 23 Date d'inscription lundi 10 avril 2006 Statut Membre Dernière intervention 11 mai 2006 - 5 mai 2006 à 11:46
bonjour j'ai un problème j'aimerai savoir comment on code la ligne entre "" en Visual basic .net

Dim myReadBuffer(1920) As Byte
Dim Donnee1(1920) As Char

networkStream.Read(myReadBuffer, 0, myReadBuffer.Length)
For i As Integer = 0 To myReadBuffer.Length

"Donnee1[i]=(char)myReadBuffer[i]"

Next i
LstOutputCli.Items.Insert(LstOutputCli.Items.Count, donneeRecus)

merci d'avance

4 réponses

cs_Willi Messages postés 2375 Date d'inscription jeudi 12 juillet 2001 Statut Modérateur Dernière intervention 15 décembre 2018 22
5 mai 2006 à 10:38
Salut,
Essais ceci

Dim myReadBuffer(1920) As Byte
Dim Donnee1(1920) As Char

networkStream.Read(myReadBuffer, 0, myReadBuffer.Length)
<STRIKE>For i As Integer = 0 To myReadBuffer.Length
"Donnee1[i]=(char)myReadBuffer[i]"
Next i
</STRIKE>Donnee1 = System.Text.ASCIIEncoding.ASCII.GetChars(myReadBuffer)
LstOutputCli.Items.Insert(LstOutputCli.Items.Count, donneeRecus)
3
cs_Willi Messages postés 2375 Date d'inscription jeudi 12 juillet 2001 Statut Modérateur Dernière intervention 15 décembre 2018 22
5 mai 2006 à 11:23
C'est normal cela vient de ton listbox après.

LstOutputCli.Items.AddRange(Donnee1)

ou si tu obtient une erreur essais ceci

For i as integer= 0 to Donnee1.Lenght-1
LstOutputCli.Items.Add(Donnee1(i)
Next
3
Chrisly74 Messages postés 23 Date d'inscription lundi 10 avril 2006 Statut Membre Dernière intervention 11 mai 2006
5 mai 2006 à 11:16
salut
si je fais ce que tu m'as dit j'obtient dans ma fenetre
System.Char[]
0
Chrisly74 Messages postés 23 Date d'inscription lundi 10 avril 2006 Statut Membre Dernière intervention 11 mai 2006
5 mai 2006 à 11:46
merci beaucoup pour ton aide ça m'a permis d'avancer enormement dans mon application

salut
0
Rejoignez-nous