C#
C#

help

Root Question Message

Koopamillion
Koopamillion10/19/2022
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)
Koopamillion
Koopamillion10/19/2022
The "msglist" does not get modified during the for loop at all
Message Not Public

Sign In and Join Server To See

10/19/2022
Koopamillion
Koopamillion10/19/2022
Yeah you're right it fixed when I set it to a copy, thank you
Koopamillion
Koopamillion10/19/2022
Didn't really understand how references worked
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy