C
C#3mo ago
Wallace

✅ Array wont fully print out Windows Forms App

Hiya new to WDF trying to output a full aray ive looped through. Though it only displays the last string in the array "King spades" Wondering why this happens
No description
10 Replies
Angius
Angius3mo ago
What's WDF? And it displays only the last element, because... you tell it to
Wallace
WallaceOP3mo ago
i didnt mean wdf mb
Angius
Angius3mo ago
You're replacing the text of textBox1 with each iteration
Wallace
WallaceOP3mo ago
how would i make it so it displays the whole array?
Angius
Angius3mo ago
You could append to that textbox Or use string.Join() and join the whole array into a string Or serialize it to JSON string Many ways
Wallace
WallaceOP3mo ago
what do you mean by append the textbox?
Angius
Angius3mo ago
Instead of replacing the text with every iteration Append to that text with every iteration
Wallace
WallaceOP3mo ago
oh i see what would i need to change to do that im unsure thanks
Angius
Angius3mo ago
+= might help
Wallace
WallaceOP3mo ago
cheers
Want results from more Discord servers?
Add your server