C
C#4w 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
Angius4w ago
What's WDF? And it displays only the last element, because... you tell it to
Wallace
Wallace4w ago
i didnt mean wdf mb
Angius
Angius4w ago
You're replacing the text of textBox1 with each iteration
Wallace
Wallace4w ago
how would i make it so it displays the whole array?
Angius
Angius4w 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
Wallace4w ago
what do you mean by append the textbox?
Angius
Angius4w ago
Instead of replacing the text with every iteration Append to that text with every iteration
Wallace
Wallace4w ago
oh i see what would i need to change to do that im unsure thanks
Angius
Angius4w ago
+= might help
Wallace
Wallace4w ago
cheers
Want results from more Discord servers?
Add your server