C
C#3y ago
koopa

Collection was modified enumeration operation may not execute

Hi - I am working on a client - server chat application for my school project. The server app has a list called "messageRecievedList" which received messages are appended to. Whenever this list is appended, the function UpdateMessageModification() is called to re print all the messages. However, it causes this problem at completely RANDOM times (I.e. I can send 40 messages from a client fine or sometimes it will only be 26 or something)
3 Replies
koopa
koopaOP3y ago
The "msglist" does not get modified during the for loop at all
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
koopa
koopaOP3y ago
Yeah you're right it fixed when I set it to a copy, thank you Didn't really understand how references worked
Want results from more Discord servers?
Add your server